Index: netisr.c
===================================================================
RCS file: /home/ncvs/src/sys/net/netisr.c,v
retrieving revision 1.6
diff -u -r1.6 netisr.c
--- netisr.c	2 Oct 2003 02:54:10 -0000	1.6
+++ netisr.c	2 Oct 2003 04:02:09 -0000
@@ -63,6 +63,8 @@
 static struct mtx netisr_mtx;
 static void *net_ih;
 
+static void	swi_processqueue(struct netisr *ni);
+
 void
 legacy_setsoftnet(void)
 {
@@ -100,7 +102,6 @@
 	int	isrs_count;			/* dispatch count */
 	int	isrs_directed;			/* ...successfully dispatched */
 	int	isrs_deferred;			/* ...queued instead */
-	int	isrs_bypassed;			/* bypassed queued packets */
 	int	isrs_queued;			/* intentionally queueued */
 	int	isrs_swi_count;			/* swi_net handlers called */
 };
@@ -108,7 +109,7 @@
 
 SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr counters");
 
-static int	netisr_enable = 0;
+static int	netisr_enable = 1;
 SYSCTL_INT(_net_isr, OID_AUTO, enable, CTLFLAG_RW, 
     &netisr_enable, 0, "enable direct dispatch");
 TUNABLE_INT("net.isr.enable", &netisr_enable);
@@ -119,8 +120,6 @@
     &isrstat.isrs_directed, 0, "");
 SYSCTL_INT(_net_isr, OID_AUTO, deferred, CTLFLAG_RD, 
     &isrstat.isrs_deferred, 0, "");
-SYSCTL_INT(_net_isr, OID_AUTO, bypassed, CTLFLAG_RD, 
-    &isrstat.isrs_bypassed, 0, "");
 SYSCTL_INT(_net_isr, OID_AUTO, queued, CTLFLAG_RD, 
     &isrstat.isrs_queued, 0, "");
 SYSCTL_INT(_net_isr, OID_AUTO, swi_count, CTLFLAG_RD, 
@@ -163,10 +162,9 @@
 		 *	b. fallback to queueing the packet,
 		 *	c. sweep the issue under the rug and ignore it.
 		 *
-		 * Currently, we do c), and keep a rough event counter.
+		 * Currently, we do a).  Previously we did c).
 		 */
-		if (_IF_QLEN(ni->ni_queue) > 0)
-			isrstat.isrs_bypassed++;
+		swi_processqueue(ni);
 		ni->ni_handler(m);
 		mtx_unlock(&netisr_mtx);
 	} else {
@@ -201,10 +199,22 @@
 }
 
 static void
+swi_processqueue(struct netisr *ni)
+{
+	struct mbuf *m;
+
+	for (;;) {
+		IF_DEQUEUE(ni->ni_queue, m);
+		if (m == NULL)
+			break;
+		ni->ni_handler(m);
+	}
+}
+
+static void
 swi_net(void *dummy)
 {
 	struct netisr *ni;
-	struct mbuf *m;
 	u_int bits;
 	int i;
 #ifdef DEVICE_POLLING
@@ -230,12 +240,7 @@
 			if (ni->ni_queue == NULL)
 				ni->ni_handler(NULL);
 			else
-				for (;;) {
-					IF_DEQUEUE(ni->ni_queue, m);
-					if (m == NULL)
-						break;
-					ni->ni_handler(m);
-				}
+				swi_processqueue(ni);
 		}
 	} while (polling);
 	mtx_unlock(&netisr_mtx);
