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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:57 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Thanks.

Luca Boccassi

---
>From cb224aacbc652fe4f706bc84e07833f01d93cf51 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>
---
 app/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 281b015363..3b2a4cbcf9 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("Line %d: Error, not all packets flushed. "
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
 
@@ -160,6 +161,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 			printf("Line %d: Error, not all packets flushed. "
 					"Expected %u, got %u\n",
 					__LINE__, BURST, total_packet_count());
+			rte_mempool_put_bulk(p, (void *)bufs, BURST);
 			return -1;
 		}
 
@@ -188,6 +190,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("Line %d: Error, not all packets flushed. "
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
 
@@ -243,6 +246,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	if (num_returned != BIG_BATCH) {
 		printf("line %d: Missing packets, expected %d\n",
 				__LINE__, num_returned);
+		rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 		return -1;
 	}
 
@@ -257,6 +261,7 @@ 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.828051142 +0000
+++ 0198-test-distributor-fix-mbuf-leak-on-failure.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,8 +1,10 @@
-From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001
+From cb224aacbc652fe4f706bc84e07833f01d93cf51 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.
@@ -12,7 +14,6 @@
 fails and returns.
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
-Cc: stable at dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif at emumba.com>
 Acked-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
@@ -22,7 +23,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index e0cb698e1c..73d735aa75 100644
+index 281b015363..3b2a4cbcf9 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)


More information about the stable mailing list