[Winpcap-users] Packets capture latency

Gianluca Varenni gianluca.varenni at cacetech.com
Wed Mar 17 12:01:41 PDT 2010



--------------------------------------------------
From: "Alimjan Kuramshin" <alimjankuramshin at gmail.com>
Sent: Wednesday, March 17, 2010 11:51 AM
To: <winpcap-users at winpcap.org>
Subject: Re: [Winpcap-users] Packets capture latency

>
> :(
>
> Well, i don't know what todo.
> I've used timeout value within 0 or -1, no luck. Mintocopy, different 
> values, from 8 to 1024, no luck.
> CPU usage reaches ~100% :(

Please look at the sample UserLevelBridge. It uses a couple of flags that 
should help you.

>
> Can u tell me, please, is it possible that problem may be in the dupplex 
> mode? I've tried to use full and half on 10 mbit/s
> and 100 mbit/s

Full or half duplex is definitely not the problem.

Have a nice day
GV

>
> And again, many thanks for your attention!!!
>
>
> 17.03.2010, в 21:41, Gianluca Varenni написал(а):
>
>> WinPcap is optimized for packet capture, at the expense of a jitter
>> introduced from the time the packet is received by the driver to the time
>> the packet is received by the user application. This means that the 
>> packet
>> is received by the driver and timestamped, saved into a kernel buffer and
>> later retrieved by the winpcap-based application. You can reduce this 
>> delay
>> by playing with the timeout and mintocopy values (they are both 
>> accessible
>> through the WinPcap API), obviously at the expense of the CPU load.
>>
>> Have a nice day
>> GV
>>
>>
>>
>> --------------------------------------------------
>> From: "Alimjan Kuramshin" <alimjankuramshin at gmail.com>
>> Sent: Wednesday, March 17, 2010 11:32 AM
>> To: <winpcap-users at winpcap.org>
>> Subject: Re: [Winpcap-users] Packets capture latency
>>
>>> Hello, Gianluca!
>>>
>>> Thank you, for your attention and reply.
>>>
>>> Well, and within Wireshark too (but this is not quite correct place for
>>> that).
>>>
>>> When i receive one packet from my device i'm emmideatly send back 
>>> received
>>> packet back(for testing)
>>> and using oscilloscope watch for my laptop ethernet card TX+ and TX- 
>>> pins.
>>>
>>> Also, i've tried to use different handles(pcap_open) for 
>>> capturing/sening
>>> data, no changes the same result. :(
>>>
>>> 17.03.2010, в 20:06, Gianluca Varenni написал(а):
>>>
>>>> What is the original delay between the packets?
>>>>
>>>> Are you looking at the timestamps with wireshark?
>>>>
>>>> Have a nice day
>>>> GV
>>>>
>>>> --------------------------------------------------
>>>> From: "Alimjan Kuramshin" <alimjankuramshin at gmail.com>
>>>> Sent: Wednesday, March 17, 2010 9:58 AM
>>>> To: <winpcap-users at winpcap.org>
>>>> Subject: [Winpcap-users] Packets capture latency
>>>>
>>>>> Hello, everyone! My name is Alimjan and i'm developing custom board 
>>>>> with
>>>>> the ethernet device and i've got some problem
>>>>> with capturing data from it ..
>>>>>
>>>>> I'm using Notebook Asus G1S with Windows XP + SP3 installed to connect
>>>>> to
>>>>> my board. Using WinPcap(4.1.1), i'm capture data from the board. So,
>>>>> i've
>>>>> found that delay between the captured packets is a very 'vary' i mean
>>>>> that
>>>>> it has huge spread, e.g,
>>>>> at 10 mbits/s i've got 45-70 us delay, it is normal i gues, but some
>>>>> times
>>>>> this delay grow up to 3-7 ms (milliseconds), for example, distance
>>>>> between
>>>>> packets: 45 us, 46 us, 50 us, 47 us and so on.. then
>>>>> 4 ms, 7 ms, 1 ms, and then again 53 us, 47 us and so on, the repeat...
>>>>> Number of 'normal' delay is also very 'vary', delay may appear in a
>>>>> different numbers of received packets, no logic :(
>>>>>
>>>>> My laptop is directly connected to my board e.g. cross TX->RX, RX->TX,
>>>>> no
>>>>> hubs or something. Also using oscilloscope connected to the  TX+ and 
>>>>> TX-
>>>>> lines i've found that it is no delay between packet that my custom 
>>>>> board
>>>>> (device) have send.  Anybody please, help me to solve this situation,
>>>>> may be i'm doing something wrong?
>>>>>
>>>>> P.S. i'm using winpcap exapmle code to capture the packets with 
>>>>> callback
>>>>> method and within pcap_next_ex.
>>>>>
>>>>> P.P.S i'm sorry for my english spelling skill, i hope that you can
>>>>> understand my.
>>>>>
>>>>> Many thanks, bye..
>>>>>
>>>>> _______________________________________________
>>>>> Winpcap-users mailing list
>>>>> Winpcap-users at winpcap.org
>>>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>>
>>>> _______________________________________________
>>>> Winpcap-users mailing list
>>>> Winpcap-users at winpcap.org
>>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>
>>> _______________________________________________
>>> Winpcap-users mailing list
>>> Winpcap-users at winpcap.org
>>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>>
>> _______________________________________________
>> Winpcap-users mailing list
>> Winpcap-users at winpcap.org
>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
> 


More information about the Winpcap-users mailing list