From owner-cvs-src-old@FreeBSD.ORG Wed Nov 24 16:03:20 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEDB01065782 for ; Wed, 24 Nov 2010 16:03:20 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DC9F68FC13 for ; Wed, 24 Nov 2010 16:03:20 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id oAOG3KHg055159 for ; Wed, 24 Nov 2010 16:03:20 GMT (envelope-from zec@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id oAOG3Kfd055158 for cvs-src-old@freebsd.org; Wed, 24 Nov 2010 16:03:20 GMT (envelope-from zec@repoman.freebsd.org) Message-Id: <201011241603.oAOG3Kfd055158@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to zec@repoman.freebsd.org using -f From: Marko Zec Date: Wed, 24 Nov 2010 16:02:58 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netgraph ng_pipe.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2010 16:03:21 -0000 zec 2010-11-24 16:02:58 UTC FreeBSD src repository Modified files: sys/netgraph ng_pipe.c Log: SVN rev 215800 on 2010-11-24 16:02:58Z by zec Simplify ng_pipe locking model by relying on the netgraph framework to provide serialization of calls into the node, which is accomplished by markng the node as single-threaded (NGF_FORCE_WRITER). The price we pay is that each ng_pipe instance now has its own callout handler which polls for queued frames on each clock tick, as long as the pipe has any frames in its internal queues. OTOH, we got rid of the global ng_pipe mutex, so from now on multiple ng_pipe instances can operate in parallel. This change also fixes counting of forwarded frames when an ng_pipe node is not enforcing any packet impairments. While here, attempt to improve adherance to style(9) throughout otherwise mostly unreadable code. MFC after: 3 days Revision Changes Path 1.7 +85 -147 src/sys/netgraph/ng_pipe.c