tcpdump mailing list archives

Bug: Counting dropped packets in linux


From: Dustin Spicuzza <dustin () virtualroadside com>
Date: Thu, 27 Aug 2009 16:18:33 -0400

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



-- 
Innovation is just a problem away

Attachment: signature.asc
Description: OpenPGP digital signature


Current thread: