[Winpcap-users] Problem with dropped packets
Gianluca Varenni
gianluca.varenni at cacetech.com
Thu Aug 19 11:12:37 PDT 2010
Carson,
if the dropped packet count is zero, then it means that the packets do not reach the winpcap driver at all, so WinPcap is not dropping the packets. Possible reasons are:
1. the packets are somewhat corrupted (wrong FCS) and the NIC drops them
2. the packets have the wrong dest MAC address (and since you are not using promiscuous mode, they are not received by WinPcap)
3. either the NIC card or the NIC card driver cannot keep up at those rates.
Have a nice day
GV
From: Morrow, Carson
Sent: Wednesday, August 18, 2010 10:50 AM
To: winpcap-users at winpcap.org
Subject: [Winpcap-users] Problem with dropped packets
I'm using winpcap to interface with some test equipment that communicates over an 100 Mb Ethernet connection (directly connected, no switch or hub). The test equipment centers around an FPGA, and I control the code on the FPGA. Most of the time, the test equipment is sending status information (two 60 B packets/s), but occasionally it will transfer the data it has collected, in response to a specific packet from the computer. It's up to 64 MB of data, transferred in up to 2097152 packets (for the full 64 MB). I want to transfer the data as quickly as possible, but I'm having trouble with packets getting dropped.
I'm using pcap_next_ex in a separate thread from the UI thread. I've adjusted the kernel buffer using pcap_setbuff, although I understand now that increasing that buffer only delays the onset of the dropped packets. I only capture the minimum portion of the packet required (60 B). I've tried adjusting the read timeout, turning off promiscuous mode, and adjusting the kernel copy size, without the improvement I'm looking for. The thread calling pcap_next_ex does very little else when receiving the test data, and right now I just have it checking the packet sequence number (so I can tell if it's dropping packets) and incrementing a counter (the UI is updated with the counter value by the separate UI thread). I tried using pcap_stats_ex to get data on the actual number of packets dropped, but it shows "0" for the different packet drop counts.
Right now, I'm seeing a few dropped packets even when sending at ~60,000 packets/s. This is with promiscuous mode on, a 500 ms read timeout, a 4 MB kernel buffer, and the min copy size adjusted anywhere from the default (16 kB, I believe) to 1 MB. I test using the release version of the software, compiled with optimizations for speed. I'm running winpcap 4.1.2 on XP on a reasonably recent laptop (Core 2 Duo, 2 GB RAM). From reading through the archives here, I'm certain winpcap can provide better performance than this.
I can provide code if it helps.
Thanks,
Carson
--------------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20100819/d2bbb34a/attachment.htm
More information about the Winpcap-users
mailing list