Date: Thu, 3 Feb 2011 19:25:54 -0500 From: Ryan Stone <rysto32@gmail.com> To: Julian Elischer <julian@freebsd.org> Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>, David Somayajulu <david.somayajulu@qlogic.com> Subject: Re: Ethernet Drivers: Question on Sending Received Packets to the FreeBSD Network Stack Message-ID: <AANLkTi=7hU_z5m1vvsfqa3wMMZo9Tz6FTzdFu8SnE1Wt@mail.gmail.com> In-Reply-To: <4D4B0682.4000201@freebsd.org> References: <75E1A2A7D185F841A975979B0906BBA6774DD4D902@AVEXMB1.qlogic.org> <4D4B0682.4000201@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 3, 2011 at 2:48 PM, Julian Elischer <julian@freebsd.org> wrote: > I had never considered passing a set of packets, but after my initial > scoffing thoughts I realized that it would actually be a very interesting > thought experiment to see if the ability to do that would be advantageous in > any way. I tmay be a way to reduce some sorts of > overhead if using interrupt mitigation. At $WORK we've put a rather considerable amount of effort into writing what I'd call a poor-man's version of netgraph. Originally, in fact, our application was entirely netgraph-based back when we were running on FreeBSD 4. What we ended up implementing was the minimal set of netgraph features our application needed, optimized for performance. Passing packets around in batches was one of the performance optimizations. There are some pretty big wins with that approach: amortization of locking costs and other overhead, better cache locality and it's easier to prefetch the data from packet n while processing packet n-1. If I get some time I'll see if I can get something by the way of hard numbers as to the advantages on our application.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=7hU_z5m1vvsfqa3wMMZo9Tz6FTzdFu8SnE1Wt>