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 <hkalra@marvell.com> Acked-by: David Hunt <david.hunt@intel.com>
This commit is contained in:
parent
b685129c79
commit
c275ded129
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user