[lkml]   [2002]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: is CONFIG_PACKET_MMAP always a win?
Dan Kegel wrote:
> c) enable CONFIG_PACKET_MMAP, use PACKET_RX_RING, and read packets from an mmap'd ring buffer
> Overhead: kernel does a full memcpy of the packet body to get it
> into the ring buffer, and my program does another to get it out.

I had a look at this about a year ago, and it seems there is no method
provided to read the packets without copying them, if you need them in
user space.

Probably the fastest way to process packets in user space is to use a
special protocol handler of your own that mmaps the area where packets
are already DMAd from the driver. I have been known to suggest simply
mapping all 1GB of low kernel memory into user space for this :-) I
haven't tried this, or writing the protocol handler, though.

-- Jamie

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.071 / U:43.164 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site