From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 72FC7A0565; Mon, 2 Mar 2020 07:48:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9FBE51BFF3; Mon, 2 Mar 2020 07:48:13 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C74DF1BFF2; Mon, 2 Mar 2020 07:48:11 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2020 22:48:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,506,1574150400"; d="scan'208";a="351471802" Received: from intel.sh.intel.com ([10.239.255.136]) by fmsmga001.fm.intel.com with ESMTP; 01 Mar 2020 22:48:06 -0800 From: Junyu Jiang To: dev@dpdk.org Cc: Xiaoyun Li , Qiming Yang , Junyu Jiang , stable@dpdk.org Date: Mon, 2 Mar 2020 06:41:21 +0000 Message-Id: <20200302064121.60561-1-junyux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226083525.68649-1-junyux.jiang@intel.com> References: <20200226083525.68649-1-junyux.jiang@intel.com> Subject: [dpdk-dev] [PATCH v3] examples/vmdq: fix the output of pools/queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 011110920..5ab3427c0 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.17.1