[dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:35:19 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ea4b1fc8b00a92f038a79d4a9c558d31b47c5079

Thanks.

Kevin.

---
>From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif at emumba.com>
Date: Tue, 8 Sep 2020 15:22:04 +0500
Subject: [PATCH] test/distributor: fix mbuf leak on failure

[ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ]

rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
but at some locations when test fails the bufs/many_bufs are
not returned back to the pool.
Due to this, multiple executions of distributor_autotest gives the
following error message: Error getting mbufs from pool.
To resolve this issue rte_mempool_put_bulk is used whenever the test
fails and returns.

Fixes: c3eabff124e6 ("distributor: add unit tests")

Signed-off-by: Sarosh Arif <sarosh.arif at emumba.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Reviewed-by: David Hunt <david.hunt at intel.com>
---
 test/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index e00966366d..aa9d35a302 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
@@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 					"Expected %u, got %u\n",
 					__LINE__, BURST, total_packet_count());
+			rte_mempool_put_bulk(p, (void *)bufs, BURST);
 			return -1;
 		}
@@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
@@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("line %d: Missing packets, expected %d\n",
 				__LINE__, num_returned);
+		rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 		return -1;
 	}
@@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		if (j == BIG_BATCH) {
 			printf("Error: could not find source packet #%u\n", i);
+			rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 			return -1;
 		}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.573397934 +0000
+++ 0033-test-distributor-fix-mbuf-leak-on-failure.patch	2020-11-18 16:33:37.935215066 +0000
@@ -1 +1 @@
-From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001
+From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
- app/test/test_distributor.c | 5 +++++
+ test/test/test_distributor.c | 5 +++++
@@ -24,5 +25,5 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index e0cb698e1c..73d735aa75 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
-@@ -135,4 +135,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index e00966366d..aa9d35a302 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
+@@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -34 +35 @@
-@@ -161,4 +162,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -40 +41 @@
-@@ -189,4 +191,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -46 +47 @@
-@@ -244,4 +247,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -52 +53 @@
-@@ -258,4 +262,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)



More information about the stable mailing list