examples/vmdq: fix the output of pools/queues

Message ID 20200226075748.67911-1-junyux.jiang@intel.com (mailing list archive)
State Superseded, archived
Headers
Series examples/vmdq: fix the output of pools/queues |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed

Commit Message

Junyu Jiang Feb. 26, 2020, 7:57 a.m. UTC
  To match the pools/queues configuration, the pools/queues output
should start from VMDQ base queue. This patch fixed the issue.

Fixes: 6bb97df521aa ("examples/vmdq: new app")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 examples/vmdq/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
  

Patch

diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 011110920..592f9bc62 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -441,10 +441,11 @@  update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 static void
 sighup_handler(int signum)
 {
-	unsigned q;
-	for (q = 0; q < num_queues; q++) {
-		if (q % (num_queues/num_pools) == 0)
-			printf("\nPool %u: ", q/(num_queues/num_pools));
+	unsigned q = vmdq_queue_base;;
+	for (; q < num_queues; q++) {
+		if (q % (num_vmdq_queues / num_pools) == 0)
+			printf("\nPool %u: ", (q - vmdq_queue_base) /
+			       (num_vmdq_queues / num_pools));
 		printf("%lu ", rxPackets[q]);
 	}
 	printf("\nFinished handling signal %d\n", signum);