On Dec 12, 2011, at 1:41 PM, Guy Harris wrote:

> On Dec 12, 2011, at 3:59 AM, David Laight wrote:
> 
>> I also think that interface could defer freeing the last
>> rx buffer until the request to read another packet.
>> That would avoid the necessity of a buffer copy
>> for applications that don't want to use callbacks.

Actually, that *might* be doable, with some additional complexity, although it 
does leave one less buffer slot available to the kernel, and, given how 
difficult it is to get an appropriate buffer slot size in the 
fixed-length-packet-slot TPACKET_V1/TPACKET_V2 architecture, that might be 
significant.  I forget why I decided not to go with that strategy.

The more I deal with TPACKET_V1/TPACKET_V2 the more annoying it is.  Hopefully 
I'll have time to look at TPACKET_V3 at some point; it looks less troublesome 
(and a bit more like BPF, at least at first glance :-)).
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to