[PATCH] net/iavf: check PTP capabilities during init

Patrick Robb probb at iol.unh.edu
Mon Nov 24 16:45:58 CET 2025


Hi. There are some DTS failures on this testbed due to misconfiguration
applied by us at UNH last week. I'm fixing it and rerunning testing which
will update the CI checks for your patchseries.

On Fri, Nov 21, 2025 at 6:39 PM Jacob Keller <jacob.e.keller at intel.com>
wrote:

> Commit d21c2fe6e5a1 ("net/iavf: fix check for PF Rx timestamp support")
> added a check against whether the PF has actually enabled Rx
> timestamping in iavf_dev_info_get(). Unfortunately, this function may be
> called prior to the PTP capabilities being exchanged, which results in
> Rx timestamping not being supported.
>
> Fix this by checking the PF PTP capabilities near the end of
> iavf_dev_init(). This ensures the VF knows the capabilities at the point
> where the iavf_dev_info_get() function can be called. Doing the check at
> init is better than inside the info callback, as the info callback is
> called many times.
>
> The capability exchange in iavf_dev_start() is kept to ensure that
> capabilities are updated after resets.
>
> Fixes: d21c2fe6e5a1 ("net/iavf: fix check for PF Rx timestamp support")
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> ---
> My recent fix to prevent enabling Rx timestamping on PFs which do support
> PTP capability but do not report Rx timestamping accidentally broke PFs
> which *do* support Rx timestamping. This is because the driver did not
> exchange capability before reporting its device info. Fix this by checking
> PF capabilities during iavf_dev_init().
> ---
>  drivers/net/intel/iavf/iavf_ethdev.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/intel/iavf/iavf_ethdev.c
> b/drivers/net/intel/iavf/iavf_ethdev.c
> index 3ef766de4704..9b07b11a6b51 100644
> --- a/drivers/net/intel/iavf/iavf_ethdev.c
> +++ b/drivers/net/intel/iavf/iavf_ethdev.c
> @@ -2887,6 +2887,14 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
>                 }
>         }
>
> +       /* Get PTP caps early to verify device capabilities */
> +       if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_PTP) {
> +               if (iavf_get_ptp_cap(adapter)) {
> +                       PMD_INIT_LOG(ERR, "Failed to get ptp capability");
> +                       goto security_init_err;
> +               }
> +       }
> +
>         iavf_default_rss_disable(adapter);
>
>         iavf_dev_stats_reset(eth_dev);
>
> ---
> base-commit: ef98b88455bf4a7c8b7aa3106a761c9e9270d6a3
> change-id: 20251121-jk-dpdk-iavf-rx-timestamping-fix-abdcb42f0197
>
> Best regards,
> --
> Jacob Keller <jacob.e.keller at intel.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/dev/attachments/20251124/59a3ae06/attachment.htm>


More information about the dev mailing list