[PATCH v2] net/cpfl: add timesync support
Bruce Richardson
bruce.richardson at intel.com
Fri Sep 4 11:52:10 CEST 2026
On Tue, Aug 25, 2026 at 01:36:48PM +0530, Kumar, Rajesh wrote:
>
> On 17-08-2026 02:48 pm, Mandal, Anurag wrote:
> > Hi All,
> >
> > Gentle reminder for review & ack.
> >
> > Thank you.
> >
> > Regards,
> > Anurag M
> > > -----Original Message-----
> > > From: Mandal, Anurag <anurag.mandal at intel.com>
> > > Sent: 03 August 2026 15:00
> > > To: dev at dpdk.org
> > > Cc: Richardson, Bruce <bruce.richardson at intel.com>; Shetty, Praveen
> > > <praveen.shetty at intel.com>; Mandal, Anurag <anurag.mandal at intel.com>
> > > 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 <anurag.mandal at intel.com>
> Reviewed-by: Rajesh Kumar <rajesh3.kumar at intel.com>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
More information about the dev
mailing list