From: "Kumar, Rajesh" <rajesh3.kumar@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>, dev@dpdk.org
Cc: <bruce.richardson@intel.com>, <aman.deep.singh@intel.com>,
<stephen@networkplumber.org>
Subject: Re: [RFC v5 1/6] ptp: introduce PTP protocol library
Date: Thu, 7 May 2026 10:15:22 +0530 [thread overview]
Message-ID: <42658998-715a-4589-b162-f3f840302dc1@intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F65849@smartserver.smartshare.dk>
On 06-05-2026 04:32 pm, Morten Brørup wrote:
>> From: Rajesh Kumar [mailto:rajesh3.kumar@intel.com]
>> Sent: Wednesday, 6 May 2026 17.41
>>
>> Add IEEE 1588-2019 Precision Time Protocol (PTP) processing library.
>>
>> The library provides packet classification, header structures, and
>> helper functions for PTP packet processing in DPDK. This avoids
>> duplicate PTP header definitions across multiple applications and
>> drivers.
>>
>> Supported transports:
>> 1. L2 PTP (EtherType 0x88F7)
>> 2. VLAN-tagged L2 PTP (single and QinQ)
>> 3. PTP over UDP/IPv4 (ports 319/320)
>> 4. PTP over UDP/IPv6 (ports 319/320)
>>
>> Public APIs:
>> 1. rte_ptp_classify()
>> 2. rte_ptp_hdr_get()
>> 3. rte_ptp_msg_type_str()
>>
>> Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com>
>> ---
> Improved PTP support seems like a good addition to DPDK.
>
> Here's some high level feedback to the library:
>
> I think much of this belongs into /lib/net/, which holds similar protocol structure definitions and helper functions for many other protocols.
> Please familiarize yourself with the code conventions in that directory, and move the relevant parts of the PTP library there (following the code conventions there).
>
> Remember to define the packet structures with endianness in mind; e.g. use rte_be32_t instead of uint32_t where appropriate.
>
> Don't define simple aliases, just use RTE_ETHER_TYPE_1588 directly.
>
> Your DPI (deep packet inspection) parser function that can parse all kinds of PTP encapsulation does not belong in the library.
> Applications would rely on a layered packet parser, such as rte_net_get_ptype().
>
> If you need a DPI parser for the examples, feel free to add it there.
Thank you for the feedback, Morten! All comments addressed in v6:
- Moved to lib/net/ as a header-only library (following rte_tcp.h
conventions)
- All multi-byte struct fields now use rte_beXX_t types
- Removed RTE_ETHER_TYPE_1588 alias; using constant directly
- DPI parser moved to example-local ptp_parse.h (not library API)
next prev parent reply other threads:[~2026-05-07 4:45 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 1:01 [RFC v1 0/4] introduce PTP protocol library and software relay example Rajesh Kumar
2026-04-27 23:42 ` Stephen Hemminger
2026-04-28 16:52 ` Kumar, Rajesh
2026-04-28 1:01 ` [RFC v1 1/4] ptp: introduce PTP protocol library Rajesh Kumar
2026-04-27 23:01 ` Stephen Hemminger
2026-04-28 16:50 ` Kumar, Rajesh
2026-04-28 1:01 ` [RFC v1 2/4] doc: add PTP library programmer's guide Rajesh Kumar
2026-04-28 1:01 ` [RFC v1 3/4] examples/ptp_tap_relay_sw: add software PTP relay example Rajesh Kumar
2026-04-28 1:01 ` [RFC v1 4/4] doc: add PTP software relay sample app guide Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 0/6] introduce PTP protocol library and software relay Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 1/6] ptp: introduce PTP protocol library Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 2/6] doc: add PTP library programmer's guide Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 3/6] examples/ptp_tap_relay_sw: add software PTP relay example Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 4/6] doc: add PTP software relay sample app guide Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 5/6] app/test: add PTP library unit tests Rajesh Kumar
2026-04-28 22:28 ` [RFC v2 6/6] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-04-29 15:37 ` [RFC v2 0/6] introduce PTP protocol library and software relay Stephen Hemminger
2026-05-04 3:49 ` Kumar, Rajesh3
2026-05-04 9:17 ` [RFC v3 " Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 1/6] ptp: introduce PTP protocol library Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 2/6] doc: add PTP library programmer's guide Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 3/6] examples/ptp_tap_relay_sw: add software PTP relay example Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 4/6] doc: add PTP software relay sample app guide Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 5/6] app/test: add PTP library unit tests Rajesh Kumar
2026-05-04 9:17 ` [RFC v3 6/6] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-05-04 17:56 ` [RFC v3 0/6] introduce PTP protocol library and software relay Stephen Hemminger
2026-05-05 16:38 ` [RFC v4 " Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 1/6] ptp: introduce PTP protocol library Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 2/6] doc: add PTP library programmer's guide Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 3/6] examples/ptp_tap_relay_sw: add software PTP relay example Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 4/6] doc: add PTP software relay sample app guide Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 5/6] app/test: add PTP library unit tests Rajesh Kumar
2026-05-05 16:38 ` [RFC v4 6/6] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 0/6] introduce PTP protocol library and software relay Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 1/6] ptp: introduce PTP protocol library Rajesh Kumar
2026-05-06 11:02 ` Morten Brørup
2026-05-07 4:45 ` Kumar, Rajesh [this message]
2026-05-06 15:41 ` [RFC v5 2/6] doc: add PTP library programmer's guide Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 3/6] examples/ptp_tap_relay_sw: add software PTP relay example Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 4/6] doc: add PTP software relay sample app guide Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 5/6] app/test: add PTP library unit tests Rajesh Kumar
2026-05-06 15:41 ` [RFC v5 6/6] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-05-06 15:45 ` [RFC v5 0/6] introduce PTP protocol library and software relay Stephen Hemminger
2026-05-07 10:13 ` [PATCH v6 0/4] PTP protocol support in lib/net Rajesh Kumar
2026-05-07 10:13 ` [PATCH v6 1/4] lib/net: add IEEE 1588 PTP v2 protocol header definitions Rajesh Kumar
2026-05-07 10:13 ` [PATCH v6 2/4] examples/ptp_tap_relay_sw: add PTP software transparent clock relay Rajesh Kumar
2026-05-07 10:13 ` [PATCH v6 3/4] doc: update release notes for PTP protocol library Rajesh Kumar
2026-05-07 10:13 ` [PATCH v6 4/4] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-05-07 13:45 ` [PATCH v7 0/4] IEEE 1588 PTP v2 protocol support in lib/net Rajesh Kumar
2026-05-07 13:45 ` [PATCH v7 1/4] lib/net: add IEEE 1588 PTP v2 protocol header definitions Rajesh Kumar
2026-05-07 15:27 ` Morten Brørup
2026-05-09 17:57 ` Kumar, Rajesh
2026-05-07 13:45 ` [PATCH v7 2/4] examples/ptp_tap_relay_sw: add PTP software transparent clock relay Rajesh Kumar
2026-05-07 13:45 ` [PATCH v7 3/4] doc: update release notes for PTP protocol library Rajesh Kumar
2026-05-07 13:45 ` [PATCH v7 4/4] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
2026-05-09 23:25 ` [PATCH v8 0/4] IEEE 1588 PTP v2 protocol support in lib/net Rajesh Kumar
2026-05-09 23:25 ` [PATCH v8 1/4] lib/net: add IEEE 1588 PTP v2 protocol header definitions Rajesh Kumar
2026-05-09 23:25 ` [PATCH v8 2/4] examples/ptp_tap_relay_sw: add PTP software transparent clock relay Rajesh Kumar
2026-05-09 23:25 ` [PATCH v8 3/4] doc: update release notes for PTP protocol library Rajesh Kumar
2026-05-09 23:25 ` [PATCH v8 4/4] examples/ptpclient: use shared PTP library definitions Rajesh Kumar
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=42658998-715a-4589-b162-f3f840302dc1@intel.com \
--to=rajesh3.kumar@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.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