From dd85fd121fc679ca32b05609f6db4d445a31c527 Mon Sep 17 00:00:00 2001 From: ad Date: Fri, 22 Dec 2006 05:34:02 +0000 Subject: [PATCH] ipintr(): check if the queue is empty before looping. Hardly a giant win, but removed 30% of splnet() calls in one local test. --- sys/netinet/ip_input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 48aea9c03b56..fa6f1d914c3b 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.240 2006/12/15 21:18:53 joerg Exp $ */ +/* $NetBSD: ip_input.c,v 1.241 2006/12/22 05:34:02 ad Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.240 2006/12/15 21:18:53 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.241 2006/12/22 05:34:02 ad Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -461,7 +461,7 @@ ipintr(void) int s; struct mbuf *m; - while (1) { + while (!IF_IS_EMPTY(&ipintrq)) { s = splnet(); IF_DEQUEUE(&ipintrq, m); splx(s);