Re: [dpdk-dev] [PATCH] net/pcap: support hardware Tx timestamps

2020-06-30 Thread Vivien Didelot
Hi Olivier, On Thu, 25 Jun 2020 18:35:32 +0200, Olivier Matz wrote: > As said by Ferruh, the unit of timestamp in mbuf is not normalized to > nanosecs, as seen in rte_mbuf_core.h: > > /** Valid if PKT_RX_TIMESTAMP is set. The unit and time reference >* are not normalized but are al

[dpdk-dev] [RFC PATCH 0/3] mlx5 to PCAP capture with hardware timestamps

2020-06-30 Thread Vivien Didelot
aders. Patrick Keroulas (2): net/mlx5: add timestamp-to-ns converter from libibverbs ethdev: add API to convert raw timestamps to nsec Vivien Didelot (1): net/pcap: support hardware Tx timestamps doc/guides/rel_notes/release_20_08.rst | 1 + drivers/common/mlx5/linux/mlx5_glue.c

[dpdk-dev] [RFC PATCH 2/3] ethdev: add API to convert raw timestamps to nsec

2020-06-30 Thread Vivien Didelot
From: Patrick Keroulas Existing ethdev functions can read/write time from/to device but they're all related to timesync and none of them can translate a raw counter in real time unit which is useful in a pdump application. A new API is required because the conversion is derived from dev clock in

[dpdk-dev] [RFC PATCH 1/3] net/mlx5: add timestamp-to-ns converter from libibverbs

2020-06-30 Thread Vivien Didelot
From: Patrick Keroulas While some devices update their own clock info to provide current time, mlx5dv part of libibverbs already handles this and also converts any raw counter cycle to nanoseconds. Signed-off-by: Patrick Keroulas --- drivers/common/mlx5/linux/mlx5_glue.c | 16 +

[dpdk-dev] [RFC PATCH 3/3] net/pcap: support hardware Tx timestamps

2020-06-30 Thread Vivien Didelot
ket headers itself afterwards). Signed-off-by: Vivien Didelot Signed-off-by: Patrick Keroulas --- doc/guides/rel_notes/release_20_08.rst | 1 + drivers/net/pcap/rte_eth_pcap.c| 30 +++--- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/doc/gui

[dpdk-dev] [PATCH 2/2] net/pcap: add TODO for writing Tx HW timestamp

2020-05-23 Thread Vivien Didelot
additional alarm thread. As a first step, pass the mbuf to the timestamp calculation function since mbuf->port and mbuf->timestamp would be needed, and add a TODO note. No functional changes. Signed-off-by: Vivien Didelot --- drivers/net/pcap/rte_eth_pcap.c | 10 -- 1 file chan

[dpdk-dev] [PATCH 1/2] net/pcap: support software Tx nanosecond timestamp

2020-05-23 Thread Vivien Didelot
PCAP_OPEN_DEAD(3PCAP) and implement nanosecond timeval addition. This also ensures that the precision reported by capinfos is nanoseconds (9). Signed-off-by: Vivien Didelot --- drivers/net/pcap/rte_eth_pcap.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers

[dpdk-dev] [PATCH v2] net/pcap: support software Tx nanosecond timestamps

2020-06-10 Thread Vivien Didelot
r might be interpreted as floating point. Signed-off-by: Vivien Didelot --- doc/guides/rel_notes/release_20_08.rst | 6 ++ drivers/net/pcap/rte_eth_pcap.c| 15 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/release_20_08.rst b/

Re: [dpdk-dev] [PATCH v2] net/pcap: support software Tx nanosecond timestamps

2020-06-10 Thread Vivien Didelot
Hi Stephen, On Tue, 9 Jun 2020 12:43:57 -0700, Stephen Hemminger wrote: > On Tue, 9 Jun 2020 15:07:19 -0400 > Vivien Didelot wrote: > > > > > +#define NSEC_PER_SEC 10L > > + > > static inline void > > calculate_timestamp(struct

[dpdk-dev] [PATCH] net/pcap: support hardware Tx timestamps

2020-06-11 Thread Vivien Didelot
ket headers itself afterwards). Signed-off-by: Vivien Didelot Signed-off-by: Patrick Keroulas --- doc/guides/rel_notes/release_20_08.rst | 1 + drivers/net/pcap/rte_eth_pcap.c| 30 +++--- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/doc/gui

Re: [dpdk-dev] [PATCH] net/pcap: support hardware Tx timestamps

2020-06-17 Thread Vivien Didelot
Hi Ferruh, On Wed, 10 Jun 2020 15:39:38 -0400, Vivien Didelot wrote: > When hardware timestamping is enabled on Rx path, system time should > no longer be used to calculate the timestamps when dumping packets. > > Instead, use the value stored by the driver in mbuf->timestamp

Re: [dpdk-dev] [PATCH] net/pcap: support hardware Tx timestamps

2020-06-25 Thread Vivien Didelot
verted to nanoseconds (otherwise the > > application may edit the packet headers itself afterwards). > > > > Signed-off-by: Vivien Didelot > > Signed-off-by: Patrick Keroulas > > --- > > doc/guides/rel_notes/release_20_08.rst | 1 + > > drivers/net/pcap/