cvs commit: src/sys/i4b/driver i4b_ing.c

Gleb Smirnoff glebius at cell.sick.ru
Mon Jul 5 13:40:13 PDT 2004


On Mon, Jul 05, 2004 at 10:06:58PM +0300, Ruslan Ermilov wrote:
R> Can you please take care of the below breakage?

Yes, I am responsible for this miss. Patch attached.

R> On Mon, Jul 05, 2004 at 05:58:03PM +0000, Warner Losh wrote:
R> > imp         2004-07-05 17:58:03 UTC
R> > 
R> >   FreeBSD src repository
R> > 
R> >   Modified files:
R> >     sys/i4b/driver       i4b_ing.c 
R> >   Log:
R> >   Add another ifdef...
R> >   
R> >   Revision  Changes    Path
R> >   1.21      +2 -0      src/sys/i4b/driver/i4b_ing.c
R> 
R> 
R> Cheers,
R> -- 
R> Ruslan Ermilov
R> ru at FreeBSD.org
R> FreeBSD committer



-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: i4b_ing.c
===================================================================
RCS file: /home/ncvs/src/sys/i4b/driver/i4b_ing.c,v
retrieving revision 1.21
diff -u -r1.21 i4b_ing.c
--- i4b_ing.c	5 Jul 2004 17:58:03 -0000	1.21
+++ i4b_ing.c	5 Jul 2004 20:37:20 -0000
@@ -734,18 +734,14 @@
 	struct ifqueue  *xmitq_p;
 	int s;
 	struct mbuf *m;
-#ifdef THIS_DOESNT_COMPILE
-	meta_p meta;
-#endif
+	struct ng_tag_prio *ptag;
 	
 	NGI_GET_M(item, m);
-	NGI_GET_META(item, meta);
 	NG_FREE_ITEM(item);
 
 	if(NG_HOOK_PRIVATE(hook) == NULL)
 	{
 		NG_FREE_M(m);
-		NG_FREE_META(meta);
 		return(ENETDOWN);
 	}
 	
@@ -760,18 +756,11 @@
        /*
 	* Now queue the data for when it can be sent
 	*/
-#ifdef THIS_DOESNT_COMPILE
-	if (meta && meta->priority > 0)
-	{
+	if ((ptag = (struct ng_tag_prio *)m_tag_locate(m, NGM_GENERIC_COOKIE,
+	    NG_TAG_PRIO, NULL)) != NULL && (ptag->priority > NG_PRIO_CUTOFF) )
 		xmitq_p = (&sc->xmitq_hipri);
-	}
 	else
-	{
 		xmitq_p = (&sc->xmitq);
-	}
-#else
-	xmitq_p = (&sc->xmitq);
-#endif
 
 	s = splimp();
 
@@ -782,7 +771,6 @@
 		IF_UNLOCK(xmitq_p);
 		splx(s);
 		NG_FREE_M(m);
-		NG_FREE_META(meta);
 		return(ENOBUFS);
 	}
 


More information about the cvs-all mailing list