From: Arne Vogel <vogel@cs.fau.de>
To: users@dpdk.org
Subject: Hardware Timestamping
Date: Mon, 11 Sep 2023 16:09:49 +0900 [thread overview]
Message-ID: <e7febd2a-2d70-61fb-5d16-d0a4f3c7a70f@cs.fau.de> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1309 bytes --]
Hi,
I am looking into getting the hardware timestamp of when a packet is
received by the NIC inside of my DPDK program. In a regular program I
can get the timestamp the packet is received by the NIC and the kernel
using SO_TIMESTAMPING [0]. Is there a way to get this timestamp in dpdk?
What I found when looking for this, it looks like `mbuf->timestamp` was
deprecated [1] and was replaced in this [2] example by
`rte_mbuf_timestamp_t` (in hwts_field). When looking at the values I get
from `hwts_field` it cycles around 50244192 though, going up _and_ down?
Looking at the output I am unsure what is actually being measured by the
rxtx_callback example. With a hardware freq. of 156024300 and about 40
cycles the latency is about 262ns. But what is this latency? From the
time the packet is received by the NIC to the first time dpdk interacts
with it? Or when I get the packet in my dpdk program?
Thanks
Arne
[0] https://docs.kernel.org/networking/timestamping.html
[1]
https://github.com/DPDK/dpdk/commit/c7e857e16fda217cb9fd3644b66abe19daa3afb3
[2]
https://github.com/DPDK/dpdk/commit/13ad83f18aaab6e0b5ddf18b3be829254a36eb00#diff-066094c5e52eeca7b5bbcc3f60cea0c8da30bf39bf039bcd809968fe3aeb9dc1L79-R89
[1]
https://github.com/DPDK/dpdk/blob/main/examples/rxtx_callbacks/main.c#L101
[-- Attachment #1.2: Type: text/html, Size: 3899 bytes --]
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5945 bytes --]
reply other threads:[~2023-09-11 7:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=e7febd2a-2d70-61fb-5d16-d0a4f3c7a70f@cs.fau.de \
--to=vogel@cs.fau.de \
--cc=users@dpdk.org \
/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).