From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E366A48B9D; Mon, 24 Nov 2025 16:47:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D59BE4067A; Mon, 24 Nov 2025 16:47:25 +0100 (CET) Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48]) by mails.dpdk.org (Postfix) with ESMTP id 70F75402B1 for ; Mon, 24 Nov 2025 16:47:24 +0100 (CET) Received: by mail-dl1-f48.google.com with SMTP id a92af1059eb24-11beb0a7bd6so5205145c88.1 for ; Mon, 24 Nov 2025 07:47:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1763999243; x=1764604043; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GADW4yAaUf2h4VPJqWbusnneUIiXFrHr6jW2F3JbDvw=; b=M4uRMCmT1iea0bgSFLSoseMbJKkL4Obr/9/yB5OwgcT/GbktRC40x9Opa7vFE4c/ET 40LUj7C62MLcUonJMSzOOqYenYp2maKRP1ABoZo2bws5ERgbgoiQCSYwD3VxtObMtKIV D+dIR91J7pGFhxcWGfrqUriM4oED1+kpkFukc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763999243; x=1764604043; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=GADW4yAaUf2h4VPJqWbusnneUIiXFrHr6jW2F3JbDvw=; b=w9w064F6+7hGvOUmv6qnUK133OYEt84KcTkwTpeH9FC4zedwXaWNNw1z8iaHGoAbI+ qfqANErcUUkgT18C2wXMFbtWxjxXYANm0Cof/38wNdWfJIqjkSZ3xO1PQGyS7+8yDCjm cwskFj4WKrn89yziPODmJ7xVqW0FOJReqecQ9Dj4x/9K32uqfIaQhf6cUxJ3TChGVk9L aqjXnOSa5Zeg+lo9bcU568+uas1y6Jj+AHgT6IKLMYya3rQmvu7nrf7+XaB8a+4psawR 68IirW7hvruiGSW6lQwGHgPW4+2gj2os6pf+ISEmBTfZ5PmhAM/fx+LfhW0wv+Smphj1 XIuA== X-Gm-Message-State: AOJu0YyDwk73vFLNqk4iLupZCUDmxNz6VcFmqTyDavzXgDBB+UJzhlon 0E0Itd8b7w34/bD+yp139FIZShBtYoSPyNaFA5Elk4OVuJvDz18x/HItiiSMo17o1ky42XeXmTh ZUYNpesEvvRufv/2KtukWJCyIqBDdguhtKxM5weUKrQ== X-Gm-Gg: ASbGncta7eowqWdPDrgPLk64Cusy5aIB4worFTdDWodtvkKnGGk/aMRUgE/YqJl8lY6 WqZ9bwBCkJ7TXVlAUnKzelYgj5sREdp0CMLwR2Rw3FJO99q+uqNaM7+6WlyXjHefq49YpWPeuBy REVW0bBtsxrsB6YgO1X3iA4N4/DdQUAy6otNcgpOZkjOM9lCROvlFDDJLe7j4/mJZBHPPhIVYqj /I3KofhlyNBjjV9DN7mit7MGaqiTN+V6SQK81gLjhOLS0IbPjH5R0MQLjLrefMPuhqfl88vDP3A ryWFrg4AE0lsVDwkGWcLVkZqd4bN X-Google-Smtp-Source: AGHT+IH3tkG9lIWE6TkzzOSDTTzgc17NeUxfxaR4FzobuSoBHEgjdUxV3Xf5rxb8ZsJvvTbgkzMMO77E6jkGqKa4Hq4= X-Received: by 2002:a05:7022:e25:b0:11a:515c:e891 with SMTP id a92af1059eb24-11c94a4db03mr9038922c88.0.1763999243373; Mon, 24 Nov 2025 07:47:23 -0800 (PST) MIME-Version: 1.0 References: <20251121-jk-dpdk-iavf-rx-timestamping-fix-v1-1-21c9a337a6f2@intel.com> In-Reply-To: <20251121-jk-dpdk-iavf-rx-timestamping-fix-v1-1-21c9a337a6f2@intel.com> From: Patrick Robb Date: Mon, 24 Nov 2025 10:45:58 -0500 X-Gm-Features: AWmQ_bnaHGMgMfTNBn1w0A4U_OFHJd6prfqSJS4QOmYRJRpWBfTNTO6Kvh8TuM4 Message-ID: Subject: Re: [PATCH] net/iavf: check PTP capabilities during init To: Jacob Keller Cc: dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000491e6206445914b7" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --000000000000491e6206445914b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFPM Jacob Keller 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 > --- > 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 checkin= g > 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 > > --000000000000491e6206445914b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi. There are some DTS failures on this testbed due t= o misconfiguration applied by us at UNH last week. I'm fixing it and re= running testing=C2=A0which will update the=C2=A0CI checks for your patchser= ies.

On Fri, Nov 21, 2025 at 6:39=E2=80=AFPM Jac= ob Keller <jacob.e.keller@in= tel.com> wrote:
Commit d21c2fe6e5a1 ("net/iavf: fix check for PF Rx timestamp s= upport")
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&= quot;)
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<= br> PF capabilities during iavf_dev_init().
---
=C2=A0drivers/net/intel/iavf/iavf_ethdev.c | 8 ++++++++
=C2=A01 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)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }

+=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Get PTP caps early to verify device capabili= ties */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (vf->vf_res->vf_cap_flags & VIRTCH= NL_VF_CAP_PTP) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (iavf_get_ptp_ca= p(adapter)) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0PMD_INIT_LOG(ERR, "Failed to get ptp capability");
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0goto security_init_err;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 iavf_default_rss_disable(adapter);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 iavf_dev_stats_reset(eth_dev);

---
base-commit: ef98b88455bf4a7c8b7aa3106a761c9e9270d6a3
change-id: 20251121-jk-dpdk-iavf-rx-timestamping-fix-abdcb42f0197

Best regards,
--=C2=A0
Jacob Keller <jacob.e.keller@intel.com>

--000000000000491e6206445914b7--