[dpdk-dev] [PATCH] app/flow-perf: fix condition of hairpin queues setup

Wisam Jaddo wisamm at mellanox.com
Tue Jun 30 10:10:28 CEST 2020


The hairpin queue is the one that start from normal rxq,
and will be less than nr_queues where nr_queues is the
sum of normal and hairpin

Fixes: bf3688f1e816 ("app/flow-perf: add insertion rate calculation")
Cc: wisamm at mellanox.com

Signed-off-by: Wisam Jaddo <wisamm at mellanox.com>
---
 app/test-flow-perf/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index e155e49c37..2a04bfb8d5 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -1013,7 +1013,7 @@ init_port(void)
 
 		if (hairpinq != 0) {
 			for (hairpin_q = RXQ_NUM, std_queue = 0;
-					std_queue < nr_queues;
+					hairpin_q < nr_queues;
 					hairpin_q++, std_queue++) {
 				hairpin_conf.peers[0].port = port_id;
 				hairpin_conf.peers[0].queue =
@@ -1028,7 +1028,7 @@ init_port(void)
 			}
 
 			for (hairpin_q = TXQ_NUM, std_queue = 0;
-					std_queue < nr_queues;
+					hairpin_q < nr_queues;
 					hairpin_q++, std_queue++) {
 				hairpin_conf.peers[0].port = port_id;
 				hairpin_conf.peers[0].queue =
-- 
2.17.1



More information about the dev mailing list