DPDK usage discussions
 help / color / mirror / Atom feed
From: Karthik Sundaravel <ksundara@redhat.com>
To: users@dpdk.org
Subject: [dpdk-users] PTP Hardware timestamping
Date: Wed, 13 Jan 2021 16:12:04 +0530	[thread overview]
Message-ID: <CAPh+B4L-gh7gMyQtdTg7+9f2Yt_AiR3uqDwQJ8Dud-W1vsyPCQ@mail.gmail.com> (raw)

NICs: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ (rev 01)
Kernel: 3.10.0-1062.18.1.el7.x86_64
DPDK Version: dpdk-20.11-rc5

My setup looks like below.



 1st Machine                                    2nd Machine

+-------------------------+      +------+     +-------------------------+
|  +---------+   +-------+|      |      |     +-------+                 |
|  | tcpdump |---| NIC A |-------|      ------|NIC A  |---------+       |
|  +---------+   +-------+|      |      |     +-------+         |       |
|                         |      |      |     |            +----|----+  |
|                         |      |Switch|     |            | Testpmd |  |
|                   -     |      |      |     |            +---------+  |
|  +---------+   +-------+|      |      |     +-------+         |       |
|  |  ptp4l  |---| NIC B |-------|      ------| NIC B |---------+       |
|  +---------+   +-------+|      |      |     +-------+                 |
+-------------------------+      +------+     +-------------------------+




I use ptp4l to generate the PTP sync messages using the command
ptp4l -i eno4 -2 -m -H

The Testpmd is compiled using
meson -Dc_args="-DRTE_LIBRTE_IEEE1588" build

and run with commands
./app/dpdk-testpmd -l 1,2,3 -- -i --nb-cores=2 --coremask=0xc
--forward-mode=ieee1588
testpmd> start

In testpmd I have modified the app/test-pmd/ieee1588fwd.c, such that the
PTP SYNC messages are forwarded to the NIC A of the first machine by
hardcoding the destination mac address.

In NIC A of the first machine. I dump the packets received from testpmd,
where I do not find the timestamps added. The tcpdump logs output

13:57:59.793588 e4:43:4b:5e:27:83 (oui Unknown) > e4:43:4b:5e:1c:22 (oui
Unknown), ethertype Unknown (0x88f7), length 60:
0x0000:  0002 002c 0000 0200 0000 0000 0000 0000  ...,............
0x0010:  0000 0000 e443 4bff fe5e 1c23 0001 2a14  .....CK..^.#..*.
0x0020:  0000 0000 0000 0000 0000 0000 0000       ..............
13:57:59.793609 e4:43:4b:5e:27:82 (oui Unknown) > e4:43:4b:5e:1c:22 (oui
Unknown), ethertype Unknown (0x88f7), length 60:
0x0000:  0002 002c 0000 0200 0000 0000 0000 0000  ...,............
0x0010:  0000 0000 e443 4bff fe5e 1c23 0001 2a14  .....CK..^.#..*.
0x0020:  0000 0000 0000 0000 0000 0000 0000       ...

I would like to understand why I am not seeing the PTP sync packets
timestamped by hardware. Is there anything I need to change in my setup to
get the hardware timestamping working ?

Also the PTP sync packet generated by ptp4l is also not timestamped, while
the PTP follow up message is timestamped. However the testpmd handles only
PTP sync packets

                 reply	other threads:[~2021-01-13 10:42 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=CAPh+B4L-gh7gMyQtdTg7+9f2Yt_AiR3uqDwQJ8Dud-W1vsyPCQ@mail.gmail.com \
    --to=ksundara@redhat.com \
    --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).