patch 'net/nfp: fix Rx memory leak' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Tue Mar 5 10:47:10 CET 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

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/31/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://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=e024c471f940415824c3ca508f71135bf4072bae

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e024c471f940415824c3ca508f71135bf4072bae Mon Sep 17 00:00:00 2001
From: Long Wu <long.wu at corigine.com>
Date: Mon, 11 Dec 2023 13:45:25 +0800
Subject: [PATCH] net/nfp: fix Rx memory leak
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 2bef94420b9036c4ad7e41270e9623ab540fa35f ]

If the Rx ring is full and do not care its return value, this will
cause memory leak.

Fixes: 766d51c9ce29 ("net/nfp: merge receive function")

Signed-off-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/flower/nfp_flower.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c
index 3698a3d4aa..1dc9b4250b 100644
--- a/drivers/net/nfp/flower/nfp_flower.c
+++ b/drivers/net/nfp/flower/nfp_flower.c
@@ -133,7 +133,9 @@ nfp_flower_pf_dispatch_pkts(struct nfp_net_hw *hw,
 		return false;
 	}

-	rte_ring_enqueue(repr->ring, (void *)mbuf);
+	if (rte_ring_enqueue(repr->ring, (void *)mbuf) != 0)
+		return false;
+
 	return true;
 }

--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 17:39:33.706014490 +0800
+++ 0089-net-nfp-fix-Rx-memory-leak.patch	2024-03-05 17:39:30.843566495 +0800
@@ -1 +1 @@
-From 2bef94420b9036c4ad7e41270e9623ab540fa35f Mon Sep 17 00:00:00 2001
+From e024c471f940415824c3ca508f71135bf4072bae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 2bef94420b9036c4ad7e41270e9623ab540fa35f ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index f950ae233b..94b50611f0 100644
+index 3698a3d4aa..1dc9b4250b 100644


More information about the stable mailing list