tcpdump mailing list archives
Re: libpcap capture performance drop
From: Guy Harris <guy () alum mit edu>
Date: Fri, 13 Aug 2010 14:00:22 -0700
On Aug 10, 2010, at 3:35 AM, Doktor Bernd wrote:
I am experiencing the same problem as described in http://news.gmane.org/find-root.php?message_id=%3c972613.6039.qm%40web59701.mail.ac4.yahoo.com%3e I have written a software that captures Ethernet frames and forwards them to different interfaces. On Ubuntu 8.10 the software is able to handle 100 Mbit/s without drops on a Intel Core 2 Duo System. When upgrading to any other version of Ubuntu, I experience between 0.5 and 3% packet loss on the same system and also on systems using Intel Core 2 Quad CPUs. The libpcap version of Ubuntu 8.10 was 0.9.8 and it was upgraded with later Ubuntu versions. I wanted to try to disable mmap (using libpcap-1.1.1) as suggested in the previous post "for Linux, after running the configure script, get rid of the definition of HAVE_PACKET_RING in config.h;" But I could not find HAVE_PACKET_RING in the created config.h and also nothing related in the ./configure output. Has this been changed?
No. I forgot that the availability of the memory-mapped pcap mechanism isn't determined by the configure script, it's determined by what the system includes offer. Instead, in pcap-linux.c, just #if 0 out the /* check for memory mapped access avaibility. We assume every needed * struct is defined if the macro TPACKET_HDRLEN is defined, because it * uses many ring related structs and macros */ # ifdef TPACKET_HDRLEN # define HAVE_PACKET_RING # ifdef TPACKET2_HDRLEN # define HAVE_TPACKET2 # else # define TPACKET_V1 0 # endif /* TPACKET2_HDRLEN */ # endif /* TPACKET_HDRLEN */ #endif /* PF_PACKET */ stuff, so that HAVE_PACKET_RING isn't defined.- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- libpcap capture performance drop Doktor Bernd (Aug 10)
- Re: libpcap capture performance drop Guy Harris (Aug 13)
- Re: libpcap capture performance drop Doktor Bernd (Aug 15)
- Re: libpcap capture performance drop Guy Harris (Aug 15)
- Re: libpcap capture performance drop Doktor Bernd (Sep 06)
- Re: libpcap capture performance drop Doktor Bernd (Aug 15)
- Re: libpcap capture performance drop Miroslav Lichvar (Aug 16)
- Re: libpcap capture performance drop Guy Harris (Aug 13)