3 Dec 2007 15:50
Re: question about mmap support
Alexander Dupuy <alex.dupuy <at> mac.com>
2007-12-03 14:50:45 GMT
2007-12-03 14:50:45 GMT
Paolo Abeni writes: > I tried to dig this in the ML archive, without any luck. It look like > there is a certain interested for the memory map patch by Phil Wood > (http://public.lanl.gov/cpw/), but it have never been merged, why ?!? > I can't say for sure, but I suspect that Phil Woods' changes, which involve a lot of configuration in environment variables are seen as a bit too intrusive (and possibly raising security issues - certainly my feeling as well). At our company, we have a privately maintained version of libpcap which includes a merge of Alexey Kuznetzov's old Linux fork of libpcap with mmap support (with his savefile and structure changes #ifdef'ed out). I suspect that Alexey's gratuitous changes to the structures and savefile format etc. may be the source of some resistance to adding support for Linux mmap. I think that it varies by distribution, but I know that Red Hat dropped the Kuznetzov fork in favor of tcdpump.org version in RHL 7 or 8, but I believe that some Linux distros (Gentoo? others?) may still have mmap support in their libpcap distros. I would guess that most people who want improved capture performance on Linux either use Phil Woods' version (which tracks the official libpcap pretty well) or Luca Deri's PF_RING version (which also requires kernel support, and is less flexible, but gives better performance for a dedicated capture appliance). Or else they get dedicated hardware like Endace DAG cards, which are supported in tcpdump.org version. I get the impression that most of the core tcpdump.org people are running on *BSD systems, so as long as the Linux version works(Continue reading)
Thanks,
Paolo
--------------------------------------------------------------------
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons above and may contain confidential
information. If you have received the message in error, be informed that any use of the content hereof is
prohibited. Please return it immediately to the sender and delete the message. Should you have any
> Undoubtedly my implementation is not the most clean one; I can rework
> the patch adding a function to control the ring size [something like
> 'pcap_set_ring_size(handle, ring_size)'] and using some default values
> for the memory mapped ring during pcap_open_live, if there is some
> consensus in this direction.
Using a function to set the ring buffer size sounds like the best choice
to me, as long as these parameters can still be changed after the open
or after packets have been read. If you can't change these parameters
during the capture I would introduce a new pcap_open_live_mmap()
function and make the "old" pcap_open_live() call pcap_open_live_mmap()
just my 2ct
Gregor
RSS Feed