From: Bruce Richardson <bruce.richardson@intel.com>
To: "Hore, Soumyadeep" <soumyadeep.hore@intel.com>
Cc: "Keller, Jacob E" <jacob.e.keller@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Greenwalt, Paul" <paul.greenwalt@intel.com>,
"Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>,
"Jiale, SongX" <songx.jiale@intel.com>
Subject: Re: [PATCH] net/iavf: check PTP capabilities during init
Date: Tue, 25 Nov 2025 13:12:02 +0000 [thread overview]
Message-ID: <aSWrIkJwhbsf7YvI@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CY8PR11MB774717DEAC152077562DB837F9D1A@CY8PR11MB7747.namprd11.prod.outlook.com>
On Tue, Nov 25, 2025 at 10:30:37AM +0000, Hore, Soumyadeep 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@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@intel.com>
>
> Hi Jacob,
>
> Currently PTP features are not enabled in DPDK. We only have the Rx timestamp API in place. Typically the change that you want needs to be implemented in ethdev_ops.timesync_enable(), which is not implemented.
>
At this stage we are post final RC for 25.11, so taking this patch would be
risky anyway. Let's target 26.03 for this, and then look to backport to
25.11.1
Thanks,
/Bruce
prev parent reply other threads:[~2025-11-25 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 23:39 Jacob Keller
2025-11-24 12:09 ` Bruce Richardson
2025-11-24 21:34 ` Jacob Keller
2025-11-24 15:45 ` Patrick Robb
2025-11-25 10:30 ` Hore, Soumyadeep
2025-11-25 13:12 ` Bruce Richardson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSWrIkJwhbsf7YvI@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jacob.e.keller@intel.com \
--cc=paul.greenwalt@intel.com \
--cc=songx.jiale@intel.com \
--cc=soumyadeep.hore@intel.com \
--cc=vladimir.medvedkin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).