tcpdump mailing list archives

Re: [PATCH] tcpdump -s 0 improvement


From: "David Laight" <David.Laight () ACULAB COM>
Date: Thu, 1 Dec 2011 09:39:36 -0000

 
On Nov 30, 2011, at 9:55 AM, David Laight wrote:

That doesn't preclude the use of variable sized buffers.
There are several schemes that could have been used that
have much the same logic, but allow variable sized buffers.

At least with the Linux design, there's a fixed ring buffer 
of descriptors for packets...

Yes - modelled on a simple ethernet mac rx ring.
So could be modified to allow a frame to use multiple buffers
(I've used 512 byte buffers for ethernet rx in the past).

Modelling as a tx ring is more flexible, eg:
- If the writes (kernel in this case) keeps track of the
  offset into the buffer space, it write the actual address
  into the descriptor just before changing the owner.
  (Means checking for the end of buffer as well as ring).
- Interleave the descriptors and buffers.
  In this case the descriptor is written with the offset
  of the next descriptor as well as the frame length.

        David


-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: