On Fri, Oct 09, 2026 at 05:34:49AM +0000, Anurag Mandal wrote: > Enabling IEEE1588 support at build time forced all ports to fall back > to the scalar Rx path, as the vector paths did not propagate either > the PTP flags or the hardware timestamp register index. > As a result, applications incurred the performance cost of scalar Rx > on all traffic, even when packet timestamping was never enabled > at runtime. > > The hardware does not embed timestamps in Rx descriptors. > Instead, it latches each timestamp into one of four dedicated > registers and reports only a validity bit along with a 2-bit > register index. > Propagating these to the mbuf requires a per-packet store > that SIMD cannot accelerate. >
The store to the mbuf does require an extra store in the vector path, but, on the other hand, the actual flag processing and the extraction of the register index can all be done using vector code without additional loads. This is because the timesync flags are in the same status block in the descriptor as the RSS/DD/EOP bits. I'll work with AI to put together a prototype native AVX2 implementation of this and reply in this thread with the patch for you to test and review. /Bruce > To remove this limitation, the vector Rx paths now perform a > lightweight scalar pass over the descriptors consumed in each > burst, populating the same PTP flags and timestamp register > index as the scalar implementation. > The timestamp decoding logic is shared between the scalar and > vector paths to ensure consistent behavior. > > Applications requiring PTP hardware timestamping therefore no > longer need to choose between hardware timestamp support and > vector Rx throughput. > > Scattered Rx reassembly already propagated the offload flags from the > last segment to the head mbuf, but it did not propagate the timestamp > register index. > Consequently, a segmented PTP packet could carry a valid timestamp flag > while retaining a stale register index. > The reassembly path now propagates the timestamp index as well, ensuring > consistent metadata for multi-segment packets. > > Tx path selection remains unchanged, and builds without IEEE1588 support > are unaffected. > > Signed-off-by: Anurag Mandal <[email protected]> > --- <snip>

