DPDK patches and discussions
 help / color / mirror / Atom feed
From: PATRICK KEROULAS <patrick.keroulas@radio-canada.ca>
To: dev@dpdk.org
Subject: [dpdk-dev] mlx5 & pdump: convert HW timestamps to nanoseconds
Date: Tue, 19 May 2020 14:20:13 -0400	[thread overview]
Message-ID: <CALEF-=A1qHi_9fdi6MQpMQrmhnjxsnEA9dMfviApU2mgnMddCQ@mail.gmail.com> (raw)


I'm trying to build an accurate capture device based on Mellanox
Connect-X5 with following requirements:
- capture every incoming packets with hardware timestamps
- output: pcap with timestamps in nanoseconds
My problem is that the packets forwarded to `dpdk-pdump` carry raw
timestamps from NIC clock.

mlx5 part of libibverbs includes a ts-to-ns converter which takes the
instantaneous clock info. It's unused in dpdk so far. I've tested it in the
device/port init routine and the result looks reliable. Since this approach
looks very simple, compared to the time sync mechanism, I'm trying to

The conversion should occur in the primary process (testpmd) I suppose.
1) The needed clock info derives from ethernet device. Is it possible to
   access that struct from a rx callback?
2) how to attach the nanosecond to mbuf so that `pdump` catches it?
   (workaround: copy `mbuf->udata64` in forwarded packets.)
3) any other idea?



             reply	other threads:[~2020-05-19 18:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 18:20 PATRICK KEROULAS [this message]
2020-05-21 15:33 ` Thomas Monjalon
2020-05-21 19:57   ` PATRICK KEROULAS
2020-05-21 20:09     ` Thomas Monjalon
2020-05-22 18:43       ` PATRICK KEROULAS
2020-05-26  7:44         ` Tom Barbette
2020-05-29 20:46           ` N. Benes
2020-05-26 16:00         ` Slava Ovsiienko
2020-05-29 20:56           ` PATRICK KEROULAS
2020-05-31 19:47             ` Slava Ovsiienko
2020-06-02 19:18           ` PATRICK KEROULAS
2020-06-03  7:48             ` Slava Ovsiienko
2020-06-05  0:09               ` PATRICK KEROULAS
2020-06-05 16:30                 ` Slava Ovsiienko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALEF-=A1qHi_9fdi6MQpMQrmhnjxsnEA9dMfviApU2mgnMddCQ@mail.gmail.com' \
    --to=patrick.keroulas@radio-canada.ca \
    --cc=dev@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).