DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC][PATCH v2 0/3] pdump HW timestamps for mlx5
@ 2020-06-11 15:16 Patrick Keroulas
  2020-06-11 15:16 ` [dpdk-dev] [RFC][PATCH v2 1/3] net/mlx5: add counter-to-ns converter from libibverbs Patrick Keroulas
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Patrick Keroulas @ 2020-06-11 15:16 UTC (permalink / raw)
  To: dev; +Cc: Patrick Keroulas

The intention is to produce a pcap with nanosecond precision when
timestamp offloading is activated on mlx5 NIC.

The packets forwarded by testpmd hold the raw counter but a pcap
requires a time unit. Assuming that the NIC clock is already synced
with external master clock, this patchset simply integrates the
nanosecond converter that is already implemented by ibverbs.

RFC:
The conversion is performed in Rx callback, in primary process because
the required clock info carried by ibv_context is not shared with
secundary process (pdump). Thus mbuf->timestamp is the chosen candidate
to convey the nanoseconds to pdump, since doc says: "unit and time
reference are not normalized but are always the same for a given port"

Patrick Keroulas (3):
  net/mlx5: add counter-to-ns converter from libibverbs
  ethdev: add API to convert raw timestamps to nsec
  net/pcap: dump hardware timestamps

 drivers/common/mlx5/linux/mlx5_glue.c    | 16 +++++++++++
 drivers/common/mlx5/linux/mlx5_glue.h    |  4 +++
 drivers/net/mlx5/mlx5.c                  |  1 +
 drivers/net/mlx5/mlx5.h                  |  1 +
 drivers/net/mlx5/mlx5_ethdev.c           | 30 ++++++++++++++++++++
 drivers/net/pcap/rte_eth_pcap.c          | 35 +++++++++++++-----------
 lib/librte_ethdev/rte_ethdev.c           | 12 ++++++++
 lib/librte_ethdev/rte_ethdev.h           | 17 ++++++++++++
 lib/librte_ethdev/rte_ethdev_core.h      |  5 ++++
 lib/librte_ethdev/rte_ethdev_version.map |  2 ++
 lib/librte_mbuf/rte_mbuf_core.h          |  3 +-
 lib/librte_pdump/rte_pdump.c             | 14 +++++++++-
 12 files changed, 122 insertions(+), 18 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-23 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 15:16 [dpdk-dev] [RFC][PATCH v2 0/3] pdump HW timestamps for mlx5 Patrick Keroulas
2020-06-11 15:16 ` [dpdk-dev] [RFC][PATCH v2 1/3] net/mlx5: add counter-to-ns converter from libibverbs Patrick Keroulas
2020-06-11 15:16 ` [dpdk-dev] [RFC][PATCH v2 2/3] ethdev: add API to convert raw timestamps to nsec Patrick Keroulas
2020-06-23 15:04   ` Slava Ovsiienko
2020-06-11 15:16 ` [dpdk-dev] [RFC][PATCH v2 3/3] net/pcap: dump hardware timestamps Patrick Keroulas

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).