svn commit: r258328 - head/sys/net

Ronald Klop ronald-freebsd8 at klop.yi.org
Wed Nov 20 08:27:18 UTC 2013


On Tue, 19 Nov 2013 22:08:21 +0100, Luigi Rizzo <rizzo at iet.unipi.it> wrote:

> On Mon, Nov 18, 2013 at 10:58:14PM +0000, George V. Neville-Neil wrote:
>> Author: gnn
>> Date: Mon Nov 18 22:58:14 2013
>> New Revision: 258328
>> URL: http://svnweb.freebsd.org/changeset/base/258328
>>
>> Log:
>>   Allow ethernet drivers to pass in packets connected via the nextpkt  
>> pointer.
>>   Handling packets in this way allows drivers to amortize work during  
>> packet reception.
>
> yes.
>
> This is only a first step and eventually we should pass the entire
> batch to the netisr handler to further reduce overhead.
>
> Some of the followup emails suggested to change the argument from
> struct mbuf * to something else.
> I do think we should change it, but what we need is a struct with
> head and tail pointers _and_ a counter, because sometimes the code
> downstream may have to append the mbuf/batch to a queue,
> and these extra fields would save iterating through the chain.
>
> Related to this: at some point we should also address batching
> in the transmit path, and for that we will eventually need to
> introduce a 'more packets to come' flag to the API/mbuf so that
> intermediate functions in the path will build batches before passing
> them down.
>
> cheers
> luigi

The Apache webserver works like this also. It has a 'bucket'-list which  
chains all data of a request and can also contain flush-commands in  
between. Probably nice to look what they do and in what ways.

Ronald.


More information about the svn-src-head mailing list