DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: PATRICK KEROULAS <patrick.keroulas@radio-canada.ca>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] mlx5 & pdump: convert HW timestamps to nanoseconds
Date: Thu, 21 May 2020 17:33:50 +0200	[thread overview]
Message-ID: <3986292.sUUuQTochr@thomas> (raw)
In-Reply-To: <CALEF-=A1qHi_9fdi6MQpMQrmhnjxsnEA9dMfviApU2mgnMddCQ@mail.gmail.com>

19/05/2020 20:20, PATRICK KEROULAS:
> Hello,
> 
> 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.

Please could you describe how you use dpdk-pdump?
Is it using the mlx5 PMD or pcap PMD?


> 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
> integrate.
> 
> 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?

The timestamp is carried in mbuf.
Then the conversion must be done by the ethdev caller (application or
any other upper layer).



  reply	other threads:[~2020-05-21 15:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 18:20 PATRICK KEROULAS
2020-05-21 15:33 ` Thomas Monjalon [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=3986292.sUUuQTochr@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=patrick.keroulas@radio-canada.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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