[PATCH 0/2] net/iavf: handle PF not enabling Rx timestamps properly
Bruce Richardson
bruce.richardson at intel.com
Mon Nov 17 12:49:43 CET 2025
On Thu, Nov 13, 2025 at 01:33:43PM -0800, Jacob Keller wrote:
> In certain cases, the PF for the iavf driver may support
> VIRTCHNL_VF_CAP_PTP but will not enable Rx timestamps. If this occurs, the
> iavf driver will attempt to continue anyways. When that happens, the
> resulting timestamps will appear to function initially. Upon closer
> inspection it becomes clear that the timestamps are invalid and bogus.
>
> First, when reporting a timestamp, always check the validity bit instead of
> blindly reporting it. This avoids extending an invalid (likely zero'd)
> timestamp value from the Rx descriptor.
>
> Second, don't enable the RTE_ETH_RX_OFFLOAD_TIMESTAMP capability if the PF
> doesn't indicate we have support. This will prevent applications from
> trying to timestamp when it is not properly enabled.
>
> Typically, this should not happen, as the PFs which support
> VIRTCHNL_VF_CAP_PTP should support Rx timestamping. However, we recently
> discovered a flaw in some implementations of the
> VIRTCHNL_OP_1588_PTP_GET_CAPS command. The layout of the capabilities
> structure is incorrect, with the caps member placed at a different byte
> offset than the expected structure layout. This is the case with the
> upstream Linux ice PF driver.
>
> This results in the PF rejecting the request for Rx timestamping, and
> leaving timestamping disabled. A proper fix for this situation is
> difficult. If we merely changed the structure layout in DPDK, then it would
> stop being compatible with other host OSes and with other implementations
> of the Linux ice PF. If we changed the layout upstream, it would break
> compatibility with the upstream iAVF VF driver.
>
> A proper fix to resolve this will take some time, as we will likely have to
> introduce a new flag or ops capability across many drivers. In the mean
> time, we should at least make sure the DPDK driver stops reporting bogus
> timestamps in such a setup.
>
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> ---
> Jacob Keller (2):
> net/iavf: check if PF actually indicates Rx timestamps
> net/iavf: check Rx timestamp validity bit
>
Series applied to dpdk-next-net-intel.
Thanks,
/Bruce
More information about the dev
mailing list