From owner-svn-src-all@FreeBSD.ORG Thu Oct 27 09:47:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D851D1065691; Thu, 27 Oct 2011 09:47:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B52B8FC20; Thu, 27 Oct 2011 09:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9R9l0nm095219; Thu, 27 Oct 2011 09:47:00 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R9l0XF095217; Thu, 27 Oct 2011 09:47:00 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110270947.p9R9l0XF095217@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 27 Oct 2011 09:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226831 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 09:47:00 -0000 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++;