Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Nov 2009 13:39:00 +0000 (UTC)
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r199865 - stable/8/sys/dev/tsec
Message-ID:  <200911271339.nARDd0hI021172@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: raj
Date: Fri Nov 27 13:38:59 2009
New Revision: 199865
URL: http://svn.freebsd.org/changeset/base/199865

Log:
  MFC r199580:
  
  tsec: Use IFQ_DRV macros for managing interface packet queue.
  
  This lets tsec(4) work with ALTQ.
  
  Submitted by:	Marcin Ligenza

Modified:
  stable/8/sys/dev/tsec/if_tsec.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/tsec/if_tsec.c
==============================================================================
--- stable/8/sys/dev/tsec/if_tsec.c	Fri Nov 27 13:19:06 2009	(r199864)
+++ stable/8/sys/dev/tsec/if_tsec.c	Fri Nov 27 13:38:59 2009	(r199865)
@@ -716,9 +716,9 @@ tsec_start_locked(struct ifnet *ifp)
 	bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap,
 	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 
-	for (;;) {
+	while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
 		/* Get packet from the queue */
-		IF_DEQUEUE(&ifp->if_snd, m0);
+		IFQ_DRV_DEQUEUE(&ifp->if_snd, m0);
 		if (m0 == NULL)
 			break;
 
@@ -755,7 +755,7 @@ tsec_start_locked(struct ifnet *ifp)
 			m0 = mtmp;
 
 		if (tsec_encap(sc, m0, fcb_inserted)) {
-			IF_PREPEND(&ifp->if_snd, m0);
+			IFQ_DRV_PREPEND(&ifp->if_snd, m0);
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911271339.nARDd0hI021172>