Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Nov 2009 13:28:07 +0000 (UTC)
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199580 - head/sys/dev/tsec
Message-ID:  <200911201328.nAKDS7vd044940@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: raj
Date: Fri Nov 20 13:28:06 2009
New Revision: 199580
URL: http://svn.freebsd.org/changeset/base/199580

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

Modified:
  head/sys/dev/tsec/if_tsec.c

Modified: head/sys/dev/tsec/if_tsec.c
==============================================================================
--- head/sys/dev/tsec/if_tsec.c	Fri Nov 20 12:48:35 2009	(r199579)
+++ head/sys/dev/tsec/if_tsec.c	Fri Nov 20 13:28:06 2009	(r199580)
@@ -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?200911201328.nAKDS7vd044940>