* [dpdk-dev] Accurate timestamps in received packets
@ 2015-10-09 15:30 Montorsi, Francesco
2015-10-10 4:52 ` Lu, Wenzhuo
0 siblings, 1 reply; 5+ messages in thread
From: Montorsi, Francesco @ 2015-10-09 15:30 UTC (permalink / raw)
To: dev
Hi all,
I'm using rte_eth_rx_burst() to successfully retrieve packets from a DPDK-enabled port. I can process the packet and everything works fine. My only issue is that I cannot find any mean to retrieve a timestamp for every single packet. As a dirty-workaround I'm using gettimeofday() to timestamp incoming packets but I would rather like to retrieve a more accurate and realistic timestamp from the Ethernet PHY layer instead. For example if I receive 32 packets in a single burst I'm just assigning the packets timestamp with 1ns of difference (using gettimeofday() for the initial time offset).
Is there a way to retrieve a realistic timestamp from the Ethernet PHY layer?
I found this patch searching on the web:
http://www.wand.net.nz/trac/libtrace/browser/Intel%20DPDK%20Patches/hardware_timestamp.patch
that is however related to an older DPDK version and works only for INTEL 82580 controllers... do you know if that simple patch linked above could be similarly ported to Intel 82599 and 82571 controllers? Is there any better/easier way to do that?
Thanks a lot,
Francesco Montorsi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Accurate timestamps in received packets
2015-10-09 15:30 [dpdk-dev] Accurate timestamps in received packets Montorsi, Francesco
@ 2015-10-10 4:52 ` Lu, Wenzhuo
2015-10-12 8:26 ` Montorsi, Francesco
0 siblings, 1 reply; 5+ messages in thread
From: Lu, Wenzhuo @ 2015-10-10 4:52 UTC (permalink / raw)
To: Montorsi, Francesco, dev
Hi Francesco,
Why not searching ieee1588 in the dpdk git repository? Surely you'll find something.
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Montorsi, Francesco
> Sent: Friday, October 9, 2015 11:30 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Accurate timestamps in received packets
>
> Hi all,
> I'm using rte_eth_rx_burst() to successfully retrieve packets from a DPDK-
> enabled port. I can process the packet and everything works fine. My only issue
> is that I cannot find any mean to retrieve a timestamp for every single packet. As
> a dirty-workaround I'm using gettimeofday() to timestamp incoming packets but
> I would rather like to retrieve a more accurate and realistic timestamp from the
> Ethernet PHY layer instead. For example if I receive 32 packets in a single burst
> I'm just assigning the packets timestamp with 1ns of difference (using
> gettimeofday() for the initial time offset).
>
> Is there a way to retrieve a realistic timestamp from the Ethernet PHY layer?
>
> I found this patch searching on the web:
>
> http://www.wand.net.nz/trac/libtrace/browser/Intel%20DPDK%20Patches/hard
> ware_timestamp.patch
> that is however related to an older DPDK version and works only for INTEL
> 82580 controllers... do you know if that simple patch linked above could be
> similarly ported to Intel 82599 and 82571 controllers? Is there any better/easier
> way to do that?
>
> Thanks a lot,
>
> Francesco Montorsi
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Accurate timestamps in received packets
2015-10-10 4:52 ` Lu, Wenzhuo
@ 2015-10-12 8:26 ` Montorsi, Francesco
2015-10-12 8:35 ` Mcnamara, John
0 siblings, 1 reply; 5+ messages in thread
From: Montorsi, Francesco @ 2015-10-12 8:26 UTC (permalink / raw)
To: Lu, Wenzhuo, dev
Hi Wenzhuo,
> -----Original Message-----
> From: Lu, Wenzhuo [mailto:wenzhuo.lu@intel.com]
> Hi Francesco,
> Why not searching ieee1588 in the dpdk git repository? Surely you'll find
> something.
I tried using IEEE 1588 without success. In particular I enabled it at build-time of DPDK and then after calling rte_eth_rx_burst() I tried calling rte_eth_timesync_read_tx_timestamp() to get a timestamp from the port_id used to receive a burst of packets, but the function always returns with an error.
Moreover, even if the function succeeded I need a timestamp for every incoming packet, not a single timestamp for the whole burst of received packets... do you know how I could achieve that?
Thanks,
Francesco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Accurate timestamps in received packets
2015-10-12 8:26 ` Montorsi, Francesco
@ 2015-10-12 8:35 ` Mcnamara, John
2015-10-12 12:25 ` Montorsi, Francesco
0 siblings, 1 reply; 5+ messages in thread
From: Mcnamara, John @ 2015-10-12 8:35 UTC (permalink / raw)
To: Montorsi, Francesco, Lu, Wenzhuo, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Montorsi, Francesco
> Sent: Monday, October 12, 2015 9:26 AM
> To: Lu, Wenzhuo; dev@dpdk.org
> Subject: Re: [dpdk-dev] Accurate timestamps in received packets
>
> Hi Wenzhuo,
>
> > -----Original Message-----
> > From: Lu, Wenzhuo [mailto:wenzhuo.lu@intel.com]
> >
> > Why not
> > searching ieee1588 in the dpdk git repository? Surely you'll find
> > something.
>
> I tried using IEEE 1588 without success. In particular I enabled it at
> build-time of DPDK and then after calling rte_eth_rx_burst() I tried
> calling rte_eth_timesync_read_tx_timestamp() to get a timestamp from the
> port_id used to receive a burst of packets, but the function always
> returns with an error.
> Moreover, even if the function succeeded I need a timestamp for every
> incoming packet, not a single timestamp for the whole burst of received
> packets... do you know how I could achieve that?
Hi,
IEEE1588 isn't suitable for this. It is a timesync protocol rather than a timestamping function.
AFAIK, timestamping of every packet isn't supported by ixgbe/i40e nics and I don't know about non-Intel nics. It was supported for some(?) igb nics and hence the patch you linked to. Also, there isn't any DPDK API to enable/disable it even if it is supported by the nic.
John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] Accurate timestamps in received packets
2015-10-12 8:35 ` Mcnamara, John
@ 2015-10-12 12:25 ` Montorsi, Francesco
0 siblings, 0 replies; 5+ messages in thread
From: Montorsi, Francesco @ 2015-10-12 12:25 UTC (permalink / raw)
To: Mcnamara, John, Lu, Wenzhuo, dev
Hi John,
Thanks for your reply.
> -----Original Message-----
> From: Mcnamara, John [mailto:john.mcnamara@intel.com]
> AFAIK, timestamping of every packet isn't supported by ixgbe/i40e nics and I
> don't know about non-Intel nics. It was supported for some(?) igb nics and
> hence the patch you linked to. Also, there isn't any DPDK API to
> enable/disable it even if it is supported by the nic.
What a pity, that's a bad news for me.
Another question in case you know: AFAIUI ixgbe/i40e devices receive packets in burst/sequences. What's the timeout for flushing the receive queue?
In other words, if I send a single packet to the PHY of the NIC, after how much time will the Intel network controller will stop waiting for further packets (to put in the same "burst") and send that single packet to the CPU?
Thanks,
Francesco
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-12 12:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 15:30 [dpdk-dev] Accurate timestamps in received packets Montorsi, Francesco
2015-10-10 4:52 ` Lu, Wenzhuo
2015-10-12 8:26 ` Montorsi, Francesco
2015-10-12 8:35 ` Mcnamara, John
2015-10-12 12:25 ` Montorsi, Francesco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).