patch 'net/nfp: fix switch domain free check' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Mar 18 16:39:00 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/20/24. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/75b8660005baf365fdcf579ac04577082da4f6dc

Thanks.

Luca Boccassi

---
>From 75b8660005baf365fdcf579ac04577082da4f6dc Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Thu, 14 Mar 2024 15:40:17 +0800
Subject: [PATCH] net/nfp: fix switch domain free check

[ upstream commit 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e ]

CI found calling 'rte_eth_switch_domain_free()' without checking return
value.

Coverity issue: 414936
Fixes: 20eaa8e2ebae ("net/nfp: free switch domain ID on close")

Signed-off-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/flower/nfp_flower.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 8490d179a9..bc1df0d369 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -1176,7 +1176,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
 	nfp_cpp_area_free(pf_dev->ctrl_area);
 	rte_free(app_fw_flower->pf_hw);
 	nfp_flow_priv_uninit(pf_dev);
-	rte_eth_switch_domain_free(app_fw_flower->switch_domain_id);
+	if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0)
+		PMD_DRV_LOG(WARNING, "Failed to free switch domain for device");
 	rte_free(app_fw_flower);
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:39.682008222 +0000
+++ 0010-net-nfp-fix-switch-domain-free-check.patch	2024-03-18 12:58:39.111344667 +0000
@@ -1 +1 @@
-From 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e Mon Sep 17 00:00:00 2001
+From 75b8660005baf365fdcf579ac04577082da4f6dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b1b9f9c11bedb672cdf01c834d6c341d50a0f1e ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 97219ff379..303f6bd3f6 100644
+index 8490d179a9..bc1df0d369 100644
@@ -24 +25,2 @@
-@@ -793,7 +793,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
+@@ -1176,7 +1176,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev)
+ 	nfp_cpp_area_free(pf_dev->ctrl_area);
@@ -26 +27,0 @@
- 	nfp_mtr_priv_uninit(pf_dev);


More information about the stable mailing list