From owner-svn-src-all@freebsd.org Wed Aug 16 20:08:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2720DCD82F; Wed, 16 Aug 2017 20:08:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BA1856D8D4; Wed, 16 Aug 2017 20:08:56 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id v7GK8ldx017181 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Aug 2017 13:08:47 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id v7GK8lsL017180; Wed, 16 Aug 2017 13:08:47 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 16 Aug 2017 13:08:47 -0700 From: Gleb Smirnoff To: Emmanuel Vadot Cc: Emmanuel Vadot , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r320944 - head/etc/rc.d Message-ID: <20170816200847.GJ1113@FreeBSD.org> References: <201707131340.v6DDeIE9086139@repo.freebsd.org> <20170815224929.GC1113@FreeBSD.org> <20170816160850.1b695e1e292f46f892301db5@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170816160850.1b695e1e292f46f892301db5@bidouilliste.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 16 Aug 2017 20:08:57 -0000 Emmanuel, On Wed, Aug 16, 2017 at 04:08:50PM +0200, Emmanuel Vadot wrote: E> > It could be that using "netgraph" action instead of "ngtee" and then E> > returning packet back from netgraph to ipfw would show lower overhead. E> > However, this setup is definitely going to be less robust and more prone E> > to bugs in case of complex ipfw configurations. E> E> I should have been more clear, I didn't mean that it would have less E> overhead in memory but in process time. E> Reading the source code I saw that ngtee simply m_dup the packet E> and then ipfw directly continue with the original one, so it seems to E> me that this would be the the fastest way to process packets. Allocating memory, doing a memory copy, and freeing memory is also process time. E> Could you expand on "less robust and more prone to bugs" for the E> "netgraph" case ? The "netgraph" action send packet to netgraph allocating a tag so that if later the ng_ipfw node receives the tagged packet back, it can inject it to the next rule after the rule with "netgraph" action. This all is documented. -- Totus tuus, Glebius.