patch 'net/nfp: fix resource leak for PF initialization' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:31:16 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/09/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/bc1e0ee2a380081930d1dd20bfe996d705d22913

Thanks.

Luca Boccassi

---
>From bc1e0ee2a380081930d1dd20bfe996d705d22913 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Mon, 4 Dec 2023 09:57:14 +0800
Subject: [PATCH] net/nfp: fix resource leak for PF initialization

[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]

Fix the resource leak problem in the abnormal logic of PF initialize
function.

Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF")

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/nfp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 9f940a12b6..3b70f5c6f1 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1088,7 +1088,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
 	return 0;
 
 hwqueues_cleanup:
-	nfp_cpp_area_free(pf_dev->hwqueues_area);
+	nfp_cpp_area_release_free(pf_dev->hwqueues_area);
 pf_cleanup:
 	rte_free(pf_dev);
 sym_tbl_cleanup:
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:39.887254737 +0000
+++ 0059-net-nfp-fix-resource-leak-for-PF-initialization.patch	2024-03-07 01:05:34.822940526 +0000
@@ -1 +1 @@
-From 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 Mon Sep 17 00:00:00 2001
+From bc1e0ee2a380081930d1dd20bfe996d705d22913 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 528812a63c4c2d74ccf2c2f2aa297fcbff3ceea9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/nfp/nfp_ethdev.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ drivers/net/nfp/nfp_ethdev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
@@ -21 +22 @@
-index c132e97d1a..6fdde105ba 100644
+index 9f940a12b6..3b70f5c6f1 100644
@@ -24 +25 @@
-@@ -1333,12 +1333,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
+@@ -1088,7 +1088,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
@@ -28,2 +29,4 @@
--	nfp_cpp_area_free(pf_dev->qc_area);
-+	nfp_cpp_area_release_free(pf_dev->qc_area);
+-	nfp_cpp_area_free(pf_dev->hwqueues_area);
++	nfp_cpp_area_release_free(pf_dev->hwqueues_area);
+ pf_cleanup:
+ 	rte_free(pf_dev);
@@ -31,8 +33,0 @@
- 	free(sym_tbl);
- fw_cleanup:
- 	nfp_fw_unload(cpp);
- 	nfp_net_keepalive_stop(&pf_dev->multi_pf);
-+	nfp_net_keepalive_uninit(&pf_dev->multi_pf);
- eth_table_cleanup:
- 	free(nfp_eth_table);
- hwinfo_cleanup:


More information about the stable mailing list