Dustin Spicuzza wrote:
> Hey,
> 
> I've been trying to determine the performance of my application (ie,
> when does it start dropping packets). I am using the current version of
> libpcap in git, with Ubuntu 9.04 server (kernel 2.6.28-15-server). I am
> using the new pcap API calls to set the ring buffer to something like
> 2GB, and I'm reasonably sure that pcap compiles with mmap support enabled.
> 
> I noticed that when looking at the packet counts as reported by
> ifconfig, it agrees with the counts reported by my generator box, and in
> this particular instance it reports a handful of dropped packets.
> However, the number of packets my application processed is the number
> reported by ifconfig, but pcap_get_stats() does *not* report the number
> of dropped packets correctly.
> 
> 
> Traffic generator ifconfig:
> 
>   41843935 inbound, 0 drops
>   27987584 outbound, 0 drops
> 
> Application box ifconfig:
> 
>   41843935 inbound, 1382 drops
>   27987584 outbound, 0 drops
> 
> Application report via pcap_get_stats()
> 
>   41842553 inbound, 0 drops
>   27987584 outbound, 0 drops
> 
>  Any thoughts on why this might be the case, and where I can find the bug?
> 
> Dustin

So after reading the libpcap and kernel source, I see that this is
actually how its supposed to work. But it *seems* like it would be quite
nice if we could grab the interface driver drop statistics as well as
drops resulting from the capture buffer filling up.

I'm looking for a way to query the kernel about this number -- should I
bother submitting a patch if I can get it, or is the current behavior
more desired?

Dustin


-- 
Innovation is just a problem away

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to