[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

upl(4) memleak, please test



hi,

use the "new" IF_INPUT_ENQUEUE macro in upl(4)
bonus: do not count dropped packets twice and dont memleak
under full queue conditions (ick!).


Index: sys/dev/usb/if_upl.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_upl.c,v
retrieving revision 1.15
diff -u -r1.15 if_upl.c
--- sys/dev/usb/if_upl.c	15 Dec 2003 23:36:14 -0000	1.15
+++ sys/dev/usb/if_upl.c	26 Jun 2004 18:25:34 -0000
@@ -1091,17 +1091,7 @@
 	inq = &ipintrq;
 
 	s = splnet();
-	if (IF_QFULL(inq)) {
-		IF_DROP(inq);
-		splx(s);
-#if 0
-		if (sc->sc_flags & SC_DEBUG)
-			printf("%s: input queue full\n", ifp->if_xname);
-#endif
-		ifp->if_iqdrops++;
-		return;
-	}
-	IF_ENQUEUE(inq, m);
+	IF_INPUT_ENQUEUE(inq, m);
 	splx(s);
 	ifp->if_ipackets++;
 	ifp->if_ibytes += m->m_len;
-- 
pb@