patch 'net/nfp: fix DMA error after abnormal exit' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:10 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=85b95b48ceaffb51f3bec5481c93c9bcb25b7267

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 85b95b48ceaffb51f3bec5481c93c9bcb25b7267 Mon Sep 17 00:00:00 2001
From: Shihong Wang <shihong.wang at corigine.com>
Date: Thu, 2 Nov 2023 10:23:13 +0800
Subject: [PATCH] net/nfp: fix DMA error after abnormal exit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 9e442599802e788874110339901f4eeb8f0ecc3b ]

When DPDK application exit abnormally, there might have DMA error,
and which will cause the load of firmware failed.

Fix this by force the physical port down to clear the possible DMA error.

Fixes: 896c265ef954 ("net/nfp: use new CPP interface")

Signed-off-by: Shihong Wang <shihong.wang at corigine.com>
Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index a780887868..1b0131b1d8 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -931,7 +931,8 @@ app_cleanup:
 static int
 nfp_pf_init(struct rte_pci_device *pci_dev)
 {
-	int ret;
+	uint32_t i;
+	int ret = 0;
 	int err = 0;
 	uint64_t addr;
 	uint32_t cpp_id;
@@ -978,6 +979,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 		goto hwinfo_cleanup;
 	}
 
+	/* Force the physical port down to clear the possible DMA error */
+	for (i = 0; i < nfp_eth_table->count; i++)
+		nfp_eth_set_configured(cpp, nfp_eth_table->ports[i].index, 0);
+
 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo)) {
 		PMD_INIT_LOG(ERR, "Error when uploading firmware");
 		ret = -EIO;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:24.595989300 +0800
+++ 0045-net-nfp-fix-DMA-error-after-abnormal-exit.patch	2023-12-11 17:56:22.987652300 +0800
@@ -1 +1 @@
-From 9e442599802e788874110339901f4eeb8f0ecc3b Mon Sep 17 00:00:00 2001
+From 85b95b48ceaffb51f3bec5481c93c9bcb25b7267 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9e442599802e788874110339901f4eeb8f0ecc3b ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +20,2 @@
- drivers/net/nfp/nfp_ethdev.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ drivers/net/nfp/nfp_ethdev.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
@@ -22 +24 @@
-index d4cc6ca64a..e988bcf5ac 100644
+index a780887868..1b0131b1d8 100644
@@ -25 +27 @@
-@@ -849,6 +849,7 @@ app_cleanup:
+@@ -931,7 +931,8 @@ app_cleanup:
@@ -28,0 +31 @@
+-	int ret;
@@ -30 +33,2 @@
- 	int ret = 0;
++	int ret = 0;
+ 	int err = 0;
@@ -33 +37 @@
-@@ -907,6 +908,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -978,6 +979,10 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -41 +45 @@
- 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo) != 0) {
+ 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo)) {


More information about the stable mailing list