[Winpcap-users] Problem with dropped packets
yulou liu
lyulou at gmail.com
Wed Aug 18 17:40:47 PDT 2010
hi, seems we are doing a simuliar work.
I need to use winpcap to capture datas from fpga through a 1Gb ethernet
card.
Packet drop in some ways relating to the performance of the PC. after I
updated my computer (Xeon cpu with 8 core, DDR 3), packet drops
reducedce...
according to your words , maybe you could send the packets in bigger size,
and open more than one thread to call the pcap_next_ex (). it works , but
there is stll packet drops when it is over 500 Mbps .
good luck.
在 2010-8-19,1:50,"Morrow, Carson" <Carson.Morrow at Honeywell.com> 写到:
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/22001e89/attachment.htm
More information about the Winpcap-users
mailing list