From: Harman Kalra Date: Fri, 5 Jul 2019 10:05:04 +0000 (+0000) Subject: test/distributor: fix flush with worker shutdown X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c275ded129cc553309c544b0574826ab23eb2153;p=dpdk.git test/distributor: fix flush with worker shutdown On restarting worker 0 after shutdown, packets handled by worker 0 must be incremented only when a packet is received by it. Fixes: c3eabff124e6 ("distributor: add unit tests") Cc: stable@dpdk.org Signed-off-by: Harman Kalra Acked-by: David Hunt --- diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index 928238f4c3..7090b55f88 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -375,7 +375,8 @@ handle_work_for_shutdown_test(void *arg) 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); }