patch 'net/nfp: fix multiple PFs check from NSP' has been queued to stable release 23.11.4
Xueming Li
xuemingl at nvidia.com
Tue Feb 18 13:34:21 CET 2025
Hi,
FYI, your patch has been queued to stable release 23.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=b96c0c90f65f490a52bdeec9ecfb9ac67375e03f
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From b96c0c90f65f490a52bdeec9ecfb9ac67375e03f 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 e704c90dc5..b27324c0b4 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -985,24 +985,25 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
return false;
}
-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;
nsp = nfp_nsp_open(cpp);
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;
}
static int
@@ -1294,7 +1295,12 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
goto hwinfo_cleanup;
}
- pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp);
+ 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->multi_pf.function_id = function_id;
ret = nfp_net_force_port_down(pf_dev, nfp_eth_table, cpp);
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-18 19:39:01.660983970 +0800
+++ 0026-net-nfp-fix-multiple-PFs-check-from-NSP.patch 2025-02-18 19:39:00.488244072 +0800
@@ -1 +1 @@
-From c19d389f5b553b0a9dddbb22882750c17a6fa577 Mon Sep 17 00:00:00 2001
+From b96c0c90f65f490a52bdeec9ecfb9ac67375e03f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c19d389f5b553b0a9dddbb22882750c17a6fa577 ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index df5482f74a..58a5b1d94e 100644
+index e704c90dc5..b27324c0b4 100644
@@ -23 +25 @@
-@@ -1751,24 +1751,25 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
+@@ -985,24 +985,25 @@ nfp_check_multi_pf_from_fw(uint32_t total_vnics)
@@ -39 +41 @@
- PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle.");
+ PMD_DRV_LOG(ERR, "NFP error when obtaining NSP handle");
@@ -55,2 +57,2 @@
-@@ -2434,8 +2435,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
- goto eth_table_cleanup;
+@@ -1294,7 +1295,12 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+ goto hwinfo_cleanup;
@@ -58,0 +61 @@
+- pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp);
@@ -65,2 +67,0 @@
- pf_dev->nfp_eth_table = nfp_eth_table;
-- pf_dev->multi_pf.enabled = nfp_check_multi_pf_from_nsp(pci_dev, cpp);
@@ -68 +68,0 @@
- pf_dev->total_phyports = nfp_net_get_phyports_from_nsp(pf_dev);
@@ -69,0 +70 @@
+ ret = nfp_net_force_port_down(pf_dev, nfp_eth_table, cpp);
More information about the stable
mailing list