Re: Capture send packets in ZC mode

Alfredo Cardigliano <[email protected]>
Newsgroups gmane.linux.ntop.general
Message-ID <[email protected]>
Hi
are you setting the flush flag to 1 when calling pfring_send()?

Alfredo

> On 26 Oct 2017, at 18:42, Charles-Antoine Mathieu <[email protected]> wrote:
> 
> Hi,
> 
> I'm trying to implement that, but my results looks odd. I'm trying to
> ping a bunch of ~20 hosts with a latency of ~1.77 ms every 5 seconds.
> 
> I capture time right after pfring_send and pfring_recv. For every batch
> I get around the same latency for every host but the latency range from
> 1ms to 300ms.
> 
> 37.187.9.32 : 11.532119ms
> 37.187.9.245 : 11.54512ms
> 37.187.9.124 : 11.525933ms
> ... 5 sec later the next batch ...
> 37.187.9.14 : 107.540483ms
> 37.187.9.17 : 107.519064ms
> 37.187.9.32 : 107.505375ms
> 
> I wonder if you are aware of some kind of buffering that might happen
> in the process to yield such results.
> 
> The ring is opened in ZC mode
> NIC model is Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network
> Connection (rev 01)
> 
> I'm using gopacket and ARISTA's nanotime package to capture a monotonic
> time which rely upon CLOCK_MONOTONIC, it seems more reliable and
> lightweight that time.Now() to me.
> https://github.com/aristanetworks/goarista/blob/master/monotime/nanotim
> e.go
> 
> On Fri, 2017-10-06 at 16:38 +0200, Alfredo Cardigliano wrote:
>> Hi
>> in ZC mode kernel is bypassed, thus you should send the packet and
>> call clock_gettime()
>> immediately after in order to compute latency (the same function is
>> used for RX in this case).
>> 
>> Alfredo
>> 
>>> 
>>> On 6 Oct 2017, at 16:34, Charles-Antoine Mathieu <charles-antoine.m
>>> [email protected]> wrote:
>>> 
>>> Hello,
>>> 
>>> I have a process that sends and receive ICMP packets using PF_RING.
>>> 
>>> I'd like to capture send and received packets to be able to compute
>>> the
>>> latency. When I'm not in ZC mode I get the send and the received
>>> packet
>>> in the capture. However in ZC mode I only get the received packets
>>> in
>>> the capture.
>>> 
>>> Is there a way go get the same behaviour in ZC mode ?
>>> _______________________________________________
>>> Ntop mailing list
>>> [email protected]
>>> http://listgateway.unipi.it/mailman/listinfo/ntop
>> _______________________________________________
>> Ntop mailing list
>> [email protected]
>> http://listgateway.unipi.it/mailman/listinfo/ntop
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEunYLiJIhvMrSEXzAm6qh6WCZ23EFAlnyF/EACgkQm6qh6WCZ
23HGuRAAjlyQsqb12HCNVU/RQO5dWvetLU2Lado008Arl9xYQ34D8LfIrCgrBubI
RMPBi51qkcAIFWvklprf4ZQjRA2cV9dxci6+1pcYtTfcaXcd4ajjNuyxJBsNFgLG
aZ0QYfm4+s5UDRk3ZGfIjM5UZLyCGtZfjUUya7E4kcMuUwGKskW9UnlKGzHvHZTE
oqAo7qgK/3bTbfsxsz1syyAcmRWR9F+sru4/4CyVuH7CFweNFhXaNnWvl7yIvTjZ
K7TDLyCYa0VVoIS6cU5bbOsZ99/fekfBdufdjtZACn2fOBXkdpjQ/VHf+eCHNToo
NsC3iIjtL/cSYbCNc5A/Wylu7cPNGIKq5dX/aRhtklNKiajyghDH2Dv27J1xQ/F2
bvb4xxsy+v9ZZQfzgPDCBnfQILT+RWwoxQpL1FvXK0eEJRlgn+B3prePRAW/1tNp
nwIFoAHckogJvmpKEDjYPZmarDoz/2Zz1JdA0adXpN+RPJq/HpbxxjE2K/PZLOTX
HDDLrVJwlFidi25k+ZA6tb9U4xKXZk3L5y0hyLB0+hNFextKRzSLOZnoaaVFJ84k
v3i63KVf2cASEBhfLefWatfcgA1Y7AQVNPx+Sihp7E3Q42SOThLclileJt+BcM03
gJ/cBTTgwyAv/Q2v/jMkh0MAq7NOPZP4CkgTsX5m2DMaaXzwm9k=
=lK0D
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.