[v2,1/2] test/distributor: flush with worker shutdown test fails

Message ID 1550501471-4196-1-git-send-email-hkalra@marvell.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/2] test/distributor: flush with worker shutdown test fails |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Harman Kalra Feb. 18, 2019, 2:51 p.m. UTC
  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 <hkalra@marvell.com>
---
 test/test/test_distributor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon March 29, 2019, 10:54 p.m. UTC | #1
18/02/2019 15:51, Harman Kalra:
> 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 <hkalra@marvell.com>

It looks to be a fix, so the tag Fixes: should be added
to help with backport, please.
The title may be improved by starting with "fix" verb
instead of mentioning "fails".
  
Thomas Monjalon July 4, 2019, 4:11 p.m. UTC | #2
29/03/2019 23:54, Thomas Monjalon:
> 18/02/2019 15:51, Harman Kalra:
> > 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 <hkalra@marvell.com>
> 
> It looks to be a fix, so the tag Fixes: should be added
> to help with backport, please.
> The title may be improved by starting with "fix" verb
> instead of mentioning "fails".

No review, no reply.
Status set to "Changes Requested" in patchwork.
  

Patch

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index 98919ec0c..a723254f7 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -373,7 +373,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);
 		}