svn commit: r226831 - head/sys/contrib/pf/net
Gleb Smirnoff
glebius at FreeBSD.org
Thu Oct 27 09:47:00 UTC 2011
Author: glebius
Date: Thu Oct 27 09:47:00 2011
New Revision: 226831
URL: http://svn.freebsd.org/changeset/base/226831
Log:
Utilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce
contention on ifqueue lock.
Modified:
head/sys/contrib/pf/net/if_pfsync.c
Modified: head/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- head/sys/contrib/pf/net/if_pfsync.c Thu Oct 27 09:45:12 2011 (r226830)
+++ head/sys/contrib/pf/net/if_pfsync.c Thu Oct 27 09:47:00 2011 (r226831)
@@ -3290,16 +3290,17 @@ void
pfsyncintr(void *arg)
{
struct pfsync_softc *sc = arg;
- struct mbuf *m;
+ struct mbuf *m, *n;
CURVNET_SET(sc->sc_ifp->if_vnet);
pfsync_ints++;
- for (;;) {
- IF_DEQUEUE(&sc->sc_ifp->if_snd, m);
- if (m == 0)
- break;
+ IF_DEQUEUE_ALL(&sc->sc_ifp->if_snd, m);
+ for (; m != NULL; m = n) {
+
+ n = m->m_nextpkt;
+ m->m_nextpkt = NULL;
if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL)
== 0)
V_pfsyncstats.pfsyncs_opackets++;
More information about the svn-src-all
mailing list