[dpdk-dev] [PATCH 1/2] test/distributor: flush with worker shutdown test fails
Harman Kalra
harman.kalra at caviumnetworks.com
Thu Nov 29 16:09:10 CET 2018
From: Harman Kalra <harman.kalra at cavium.com>
On restarting worker 0 after shutdown, packets handled by
worker 0 must be incremented only when a packet is received by
it.
Signed-off-by: Harman Kalra <harman.kalra at cavium.com>
---
test/test/test_distributor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git test/test/test_distributor.c test/test/test_distributor.c
index 98919ec..a723254 100644
--- test/test/test_distributor.c
+++ test/test/test_distributor.c
@@ -373,7 +373,8 @@ struct worker_stats {
id, buf, buf, num);
while (!quit) {
- worker_stats[id].handled_packets++, count++;
+ worker_stats[id].handled_packets += num;
+ count += num;
rte_pktmbuf_free(pkt);
num = rte_distributor_get_pkt(d, id, buf, buf, num);
}
--
1.8.3.1
More information about the dev
mailing list