Re: [PATCH v2] net/cpfl: add timesync support
From: Bruce Richardson <hidden>
Date: 2026-09-04 09:52:21
On Tue, Aug 25, 2026 at 01:36:48PM +0530, Kumar, Rajesh wrote:
On 17-08-2026 02:48 pm, Mandal, Anurag wrote:quoted
Hi All, Gentle reminder for review & ack. Thank you. Regards, Anurag Mquoted
-----Original Message----- From: Mandal, Anurag <redacted> Sent: 03 August 2026 15:00 To: dev@dpdk.org Cc: Richardson, Bruce <redacted>; Shetty, Praveen [off-list ref]; Mandal, Anurag [off-list ref] Subject: [PATCH v2] net/cpfl: add timesync support The cpfl PMD advertises RTE_ETH_RX_OFFLOAD_TIMESTAMP, so received packets carry a 32-bit hardware timestamp that the common idpf Rx path extends to 64-bit nanoseconds using the device PTP clock (PHC). However, it never initialised the PHC, so the timestamp conversion had no reference time. Applications had no way to enable timestamping or to read the current device clock to correlate the mbuf timestamps. This patch adds PTP support by reusing the idpf common PTP helpers: - timesync_enable: allocate and initialise the adapter PTP state, query the PTP capabilities, program the base increment value and set the device clock to the current system time. The PTP state is shared by all vports of an adapter, so it is initialised only once. - timesync_read_time: return the current device clock as a timespec. - timesync_disable: release the PTP state. Once timesync is enabled, the common Rx path resolves the cached PHC time, so the mbuf Rx timestamp dynfield reports valid nanosecond values and applications can read the device clock with rte_eth_timesync_read_time(). Signed-off-by: Anurag Mandal <redacted>Reviewed-by: Rajesh Kumar <redacted>
Applied to dpdk-next-net-intel. Thanks, /Bruce