The ethdev timesync API currently exposes Tx timestamps through a shared hardware register. This requires applications to serialize timestamped packets and does not allow correlation when multiple packets are in flight.
This RFC proposes an ethdev interface for hardware with independent Tx timestamp slots. The interface reports the supported timestamping mechanism, provides a port-global slot lifecycle, and lets applications poll each slot asynchronously after transmission. The proposal includes the following components: * Capability reporting for shared-register and per-packet timestamping. * Slot allocation, asynchronous timestamp retrieval, and slot release. * A dual-domain timestamp structure for adjusted PHC and raw hardware time. * Mbuf dynamic field and dynflag support for passing slot handles to Tx. * Registration and process-local disabling of slot metadata. * A compatibility alias for the mbuf stamping helper. * Programmer-guide and NIC feature documentation. The legacy rte_eth_timesync_read_tx_timestamp() API remains available on devices using a shared timestamp register. This RFC adds the ethdev and PMD interfaces but does not add a hardware-specific PMD implementation. The following areas would benefit from review: * Is the capability model sufficient for devices with different slot allocation or completion mechanisms? * Is an mbuf dynamic field and dynflag the appropriate way to pass the slot handle into the Tx datapath? * Is -EAGAIN the appropriate result while a slot timestamp is pending? * Should the adjusted and raw timestamp domains use nanoseconds in the public structure, or should one domain expose hardware cycles instead? Rajesh Kumar (1): ethdev: add Tx timestamp slot management APIs doc/guides/nics/features.rst | 16 +- doc/guides/prog_guide/ethdev/index.rst | 1 + doc/guides/prog_guide/ethdev/timesync.rst | 216 +++++++++++++++++++ lib/ethdev/ethdev_driver.h | 25 +++ lib/ethdev/rte_ethdev.c | 152 +++++++++++++ lib/ethdev/rte_ethdev.h | 251 ++++++++++++++++++++++ 6 files changed, 657 insertions(+), 4 deletions(-) create mode 100644 doc/guides/prog_guide/ethdev/timesync.rst -- 2.55.0

