I tried a lot of different configurations but could not figure out why
I get those weird latencies by taking the time right after send ans
recv calls.

I'm reduced the code to the minimum and put it in this repository if
you want to take a quick look.
https://github.com/camathieu/pfring_latency#pfring_latency

Now, I wonder if there is some tweaks in the module or driver parameter
that I overlooked or if it could be related to golang because I'm out
of ideas ^^.

On Fri, 2017-10-27 at 10:18 +0200, Charles-Antoine Mathieu wrote:
> Yes : 
> 
> https://github.com/google/gopacket/blob/master/pfring/pfring.go#L247
> 
> On Thu, 2017-10-26 at 19:14 +0200, Alfredo Cardigliano wrote:
> > 
> > Hi
> > are you setting the flush flag to 1 when calling pfring_send()?
> > 
> > Alfredo
> > 
> > > 
> > > 
> > > On 26 Oct 2017, at 18:42, Charles-Antoine Mathieu <charles-
> > > antoine.
> > > [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/n
> > > an
> > > otim
> > > 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
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to