From 70c37e32083468e0496e5b12dbdd99d7a95d8b15 Mon Sep 17 00:00:00 2001 From: Junyu Jiang Date: Mon, 2 Mar 2020 06:41:21 +0000 Subject: [PATCH] examples/vmdq: fix output of pools/queues 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 Acked-by: Xiaoyun Li Tested-by: Yingya Han --- examples/vmdq/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 67aa558887..a66dd533c8 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 int q = vmdq_queue_base; + for (; q < num_queues; q++) { + if ((q - vmdq_queue_base) % (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); -- 2.20.1