[dpdk-stable] patch 'test/distributor: collect return mbufs' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:49 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 3a30ad139a83687e015de9dadc762013d45e3be4 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:53 +0200
Subject: [PATCH] test/distributor: collect return mbufs

[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ]

During quit_workers function distributor's main core processes
some packets to wake up pending worker cores so they can quit.
As quit_workers acts also as a cleanup procedure for next test
case it should also collect these packets returned by workers'
handlers, so the cyclic buffer with returned packets
in distributor remains empty.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Acked-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 6e5bdc3f60..7219925521 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	const unsigned num_workers = rte_lcore_count() - 1;
 	unsigned i;
 	struct rte_mbuf *bufs[RTE_MAX_LCORE];
+	struct rte_mbuf *returns[RTE_MAX_LCORE];
 	if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) {
 		printf("line %d: Error getting mbufs from pool\n", __LINE__);
 		return;
@@ -606,6 +607,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	rte_distributor_flush(d);
 	rte_eal_mp_wait_lcore();
 
+	while (rte_distributor_returned_pkts(d, returns, RTE_MAX_LCORE))
+		;
+
+	rte_distributor_clear_returns(d);
 	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
 
 	quit = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.597055959 +0000
+++ 0190-test-distributor-collect-return-mbufs.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,8 +1,10 @@
-From 79c5e12ac29567ed6c1750f732f04619c2a9cc7a Mon Sep 17 00:00:00 2001
+From 3a30ad139a83687e015de9dadc762013d45e3be4 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
 Date: Sat, 17 Oct 2020 05:06:53 +0200
 Subject: [PATCH] test/distributor: collect return mbufs
 
+[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ]
+
 During quit_workers function distributor's main core processes
 some packets to wake up pending worker cores so they can quit.
 As quit_workers acts also as a cleanup procedure for next test
@@ -12,7 +14,6 @@
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
 Fixes: c0de0eb82e40 ("distributor: switch over to new API")
-Cc: stable at dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
 Acked-by: David Hunt <david.hunt at intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 4343efed14..3f0aeb7b90 100644
+index 6e5bdc3f60..7219925521 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


More information about the stable mailing list