<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="monospace">Hi,</font></p>
    <p><font face="monospace">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 </font><font
        face="monospace">SO_TIMESTAMPING [0]. Is there a way to get this
        timestamp in dpdk?<br>
      </font></p>
    <p><font face="monospace">What I found when looking for this, it
        looks like `mbuf->timestamp` was deprecated [1] and was
        replaced in this [2] example by `<span class="blob-code-inner
          blob-code-marker js-code-nav-pass " data-code-marker="+"><span
            class="pl-s1">rte_mbuf_timestamp_t` (in </span></span><span
          class="blob-code-inner blob-code-marker js-code-nav-pass "
          data-code-marker="+"><span class="pl-s1"><span
              class="blob-code-inner blob-code-marker js-code-nav-pass "
              data-code-marker="+"><span class="pl-en">hwts_field)</span></span>.
            When looking at the values I get from `</span></span><span
          class="blob-code-inner blob-code-marker js-code-nav-pass "
          data-code-marker="+"><span class="pl-en">hwts_field` it cycles
            around 50244192 though, going up _and_ down?</span></span></font></p>
    <p><font face="monospace"><span class="blob-code-inner
          blob-code-marker js-code-nav-pass " data-code-marker="+"><span
            class="pl-en">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?<br>
          </span></span></font></p>
    <p><font face="monospace"><span class="blob-code-inner
          blob-code-marker js-code-nav-pass " data-code-marker="+"><span
            class="pl-en">Thanks</span></span></font></p>
    <p><font face="monospace"><span class="blob-code-inner
          blob-code-marker js-code-nav-pass " data-code-marker="+"><span
            class="pl-en">Arne<br>
          </span></span></font></p>
    <p><font face="monospace"><span class="blob-code-inner
          blob-code-marker js-code-nav-pass " data-code-marker="+"><span
            class="pl-en">[0]
            <a class="moz-txt-link-freetext" href="https://docs.kernel.org/networking/timestamping.html">https://docs.kernel.org/networking/timestamping.html</a><br>
          </span></span><span class="blob-code-inner blob-code-marker
          js-code-nav-pass " data-code-marker="+"><span class="pl-s1"></span></span></font></p>
    <p><font face="monospace">[1]
<a class="moz-txt-link-freetext" href="https://github.com/DPDK/dpdk/commit/c7e857e16fda217cb9fd3644b66abe19daa3afb3">https://github.com/DPDK/dpdk/commit/c7e857e16fda217cb9fd3644b66abe19daa3afb3</a></font></p>
    <p><font face="monospace">[2]
<a class="moz-txt-link-freetext" href="https://github.com/DPDK/dpdk/commit/13ad83f18aaab6e0b5ddf18b3be829254a36eb00#diff-066094c5e52eeca7b5bbcc3f60cea0c8da30bf39bf039bcd809968fe3aeb9dc1L79-R89">https://github.com/DPDK/dpdk/commit/13ad83f18aaab6e0b5ddf18b3be829254a36eb00#diff-066094c5e52eeca7b5bbcc3f60cea0c8da30bf39bf039bcd809968fe3aeb9dc1L79-R89</a><br>
      </font></p>
    <p><font face="monospace">[1]
<a class="moz-txt-link-freetext" href="https://github.com/DPDK/dpdk/blob/main/examples/rxtx_callbacks/main.c#L101">https://github.com/DPDK/dpdk/blob/main/examples/rxtx_callbacks/main.c#L101</a></font><br>
    </p>
  </body>
</html>