[1/2] test/distributor: flush with worker shutdown test fails
diff mbox series

Message ID 1543504135-137867-1-git-send-email-harman.kalra@caviumnetworks.com
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • [1/2] test/distributor: flush with worker shutdown test fails
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Harman Kalra Nov. 29, 2018, 3:09 p.m. UTC
From: Harman Kalra <harman.kalra@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@cavium.com>
---
 test/test/test_distributor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Yigit, Ferruh Jan. 16, 2019, 7:53 p.m. UTC | #1
On 11/29/2018 3:09 PM, Harman Kalra wrote:
> From: Harman Kalra <harman.kalra@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@cavium.com>

Hi Harman,

The patchset doesn't apply cleanly because the relative path in the diff is not
correct, can you please send a new version of it?

Patch
diff mbox series

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);
 		}