This is wrong. If your application is not fast enough at processing packets, it 
does not drop them (in order to drop packets, you need to see the packets and 
make the choice to drop them). The drop gets pushed all the way down to the 
driver (and you will see ps_drop > 0).

If you detect missing packets (by looking at sequence numbers in the packets) 
but ps_drop is zero, then the reasons can be

1.       Packets are dropped directly by the NIC card or NIC driver for lack of 
resources (where resources can be a variety of things, including memory 
descriptors and bandwidth on the PCI/PCIe/USB bus)

2.       Packets are dropped by the NIC card because they have the wrong FCS 
(e.g. interference on the Ethernet cable?)

3.       Packets are dropped by the NIC because the NIC sucks and cannot keep up

I would definitely try with a good NIC (e.g. some intel PCIe one) and see if 
anything changes.

Have a nice day
GV


From: [email protected] 
[mailto:[email protected]] On Behalf Of Helmut Vaupotitsch
Sent: Tuesday, November 30, 2010 11:12 PM
To: [email protected]
Subject: Re: [Winpcap-users] About the packet drops and use of pcap_stats_ex()

if ps_drop=0, then the *driver* hasn“t lost packets (see Re: [Winpcap-users] 
Question about the struct type pcap_t. from 28.10!)
Most likely your app looses packets...
...try to implement a ringbuffer in the following way: one thread just fills 
the pre-allocated FIFO, another thread processes the buffer

Regards
Helmut

yulou liu schrieb:



I have made these experiments :

PC captures data packets  from a FPGA board.

1,  I made a Loop back test that can verify there is no packet drops  between  
FPGA TO FPGA.

2Each data packets from FPGA board has a sequence number. Then PC can figure  
that there  are  packets drops. (the packets number that pc gets does not match 
the sequence of the packets).

3,  call the pcap_stats_ex() , the result  is : ps_drop=0 .  That means  there 
is no packets drops between the kernel buffer to  user buffer.


According  to above ,   Packet drops  could occur in  the  system netcard to 
winPcap kernel driver.      Is this conclusion right ?
Is it is right ,  what is the suggestion ?    Can it be improved to use a more 
professional net card  ?





Liuyulou



________________________________



_______________________________________________

Winpcap-users mailing list

[email protected]<mailto:[email protected]>

https://www.winpcap.org/mailman/listinfo/winpcap-users





--

----------------------------------------------------------------

Ing. Helmut Vaupotitsch        Phone:  +43 (0)3133 3780 16

ITEC Tontechnik und            Fax:    +43 (0)3133 3780 9

Industrieelektronik GmbH       E-mail: 
[email protected]<mailto:[email protected]>

A-8200 Lassnitzthal 300        URL:    http://www.itec-audio.com

----------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to