Re: 4.9-STABLE heavily dropping packets? libpcap issue?

From: Petri Helenius (pete_at_he.iki.fi)
Date: 02/12/04

  • Next message: Bill: "Obtaining 75k (active) concurrent tcp sessions.."
    Date: Fri, 13 Feb 2004 00:47:55 +0200
    To: Guy Helmer <ghelmer@palisadesys.com>
    
    

    Guy Helmer wrote:

    >Emre Bastuz wrote on Thursday, February 12, 2004 3:43 PM
    >
    >
    >>Hi,
    >>
    >>for sniffing purposes I have a FreeBSD 4.9-STABLE box running on highend,
    >>state-of-the-art hardware (Xeon something) with all bells and whistles.
    >>
    >>The NICīs an onboard copper em0 with gig-e capabilities.
    >>
    >>Nevertheless I am getting massive packet drops (40%-60%) when I
    >>start sniffing a
    >>gigabit ehthernet segment although the CPU load is very low.
    >>
    >>After doing some research in in the appropriate mailing list
    >>archives I found
    >>out that there are (or were?) sometimes issues with the libpcap.
    >>As there was a
    >>more current one in the ports collection (0.8.1 as opposed to 0.7
    >>in the base
    >>system) I used this instead (with LIBPCAP_OVERWRITE_BASE=yes) but
    >>still I am
    >>losing the same amount of packets when doing a tcpdump.
    >>
    >>
    >
    >I don't know what libpcap in ports does regarding the size of the packet
    >capture read buffer, but I've modified the stock libpcap's pcap-bpf.c so it
    >offers to use a buffer much larger than 32768 bytes (look for the loop that
    >has the line
    >
    > for (v = 32768; v != 0; v >>= 1) {
    >
    >and increase 32768 to something more reasonable (say, 1048576).
    >
    >I've also set the debug.bpf_bufsize and debug.bpf_maxbufsize sysctls to
    >match the number in pcap-bpf.c.
    >
    >
    >
    This is also fixed in more current libpcap version, however that has not
    been ported to the tree.

    Pete

    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Bill: "Obtaining 75k (active) concurrent tcp sessions.."

    Relevant Pages

    • RE: 4.9-STABLE heavily dropping packets? libpcap issue?
      ... Subject: 4.9-STABLE heavily dropping packets? ... out that there are sometimes issues with the libpcap. ... This message was sent using IMP, the Internet Messaging Program. ... To unsubscribe, ...
      (freebsd-net)
    • Help wanted on port scanner
      ... I've got a port scanner that I built with my own two little hands. ... It is built on top of libpcap and also libnet. ... libpcap just to listen for SYN+ACK response packets. ... Obviously if sendto() is known to never block when called for a RAW ...
      (freebsd-net)
    • Re: linux socket filter
      ... In the documentation of "libpcap" I' ve read that the used filter is "BSD", ... I' ve tested that "libpcap" records "received packets" too. ...
      (comp.os.linux.networking)
    • POSIX Threads locks failed
      ... Sorry for my english. ... I use libpcap and libc_r under FreeBSD 5.2.1-p9, ... I'm getting packets from bpf with pcap_next function in one ...
      (freebsd-current)
    • Re: Linux internals: tcpdump and ethernet driver
      ... > tcpdump grabs the packets using libpcap. ... You can Google for it. ... Tony Mountifield ...
      (comp.os.linux.networking)