patch 'net/nfp: fix multiple PFs check from NSP' has been queued to stable release 24.11.2

Kevin Traynor ktraynor at redhat.com
Thu Feb 13 10:58:07 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/25. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7f3506343cd492b6ff54e0f2abec67bfbd9c000d

Thanks.

Kevin

---
>From 7f3506343cd492b6ff54e0f2abec67bfbd9c000d Mon Sep 17 00:00:00 2001
From: Zerun Fu <zerun.fu at corigine.com>
Date: Wed, 22 Jan 2025 09:28:15 +0800
Subject: [PATCH] net/nfp: fix multiple PFs check from NSP

[ upstream commit c19d389f5b553b0a9dddbb22882750c17a6fa577 ]

Fix multiple PFs check from NSP problem in the logic of PF initialization.

Fixes: 8ad2cc8fec37 ("net/nfp: add flag for multiple PFs support")

Signed-off-by: Zerun Fu <zerun.fu at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index f54483822f..aad044a0f7 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1750,9 +1750,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
 }
 
-static inline bool
+static inline int
 nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev,
-		struct nfp_cpp *cpp)
+		struct nfp_cpp *cpp,
+		bool *flag)
 {
-	bool flag;
 	struct nfp_nsp *nsp;
 
@@ -1760,12 +1760,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev,
 	if (nsp == NULL) {
 		PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle.");
-		return false;
+		return -EIO;
 	}
 
-	flag = (nfp_nsp_get_abi_ver_major(nsp) > 0) &&
+	*flag = (nfp_nsp_get_abi_ver_major(nsp) > 0) &&
 			(pci_dev->id.device_id == PCI_DEVICE_ID_NFP3800_PF_NIC);
 
 	nfp_nsp_close(nsp);
-	return flag;
+
+	return 0;
 }
 
@@ -2433,6 +2434,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	}
 
+	ret = nfp_check_multi_pf_from_nsp(pci_dev, cpp, &pf_dev->multi_pf.enabled);
+	if (ret != 0) {
+		PMD_INIT_LOG(ERR, "Failed to check multi pf from NSP.");
+		goto eth_table_cleanup;
+	}
+
 	pf_dev->nfp_eth_table = nfp_eth_table;
-	pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp);
 	pf_dev->multi_pf.function_id = function_id;
 	pf_dev->total_phyports = nfp_net_get_phyports_from_nsp(pf_dev);
-- 
2.48.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-12 17:29:38.896473064 +0000
+++ 0040-net-nfp-fix-multiple-PFs-check-from-NSP.patch	2025-02-12 17:29:34.318945739 +0000
@@ -1 +1 @@
-From c19d389f5b553b0a9dddbb22882750c17a6fa577 Mon Sep 17 00:00:00 2001
+From 7f3506343cd492b6ff54e0f2abec67bfbd9c000d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c19d389f5b553b0a9dddbb22882750c17a6fa577 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index df5482f74a..58a5b1d94e 100644
+index f54483822f..aad044a0f7 100644
@@ -23 +24 @@
-@@ -1752,9 +1752,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
+@@ -1750,9 +1750,9 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
@@ -36 +37 @@
-@@ -1762,12 +1762,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev,
+@@ -1760,12 +1760,13 @@ nfp_check_multi_pf_from_nsp(struct rte_pci_device *pci_dev,
@@ -53 +54 @@
-@@ -2435,6 +2436,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -2433,6 +2434,11 @@ nfp_pf_init(struct rte_pci_device *pci_dev)



More information about the stable mailing list