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 2FDFFA055E; Wed, 26 Feb 2020 09:43:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F0D21BFC8; Wed, 26 Feb 2020 09:43:50 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A56651BFAB; Wed, 26 Feb 2020 09:43:48 +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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 00:43:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,487,1574150400"; d="scan'208";a="350341406" Received: from intel.sh.intel.com ([10.239.255.136]) by fmsmga001.fm.intel.com with ESMTP; 26 Feb 2020 00:43:45 -0800 From: Junyu Jiang To: dev@dpdk.org Cc: Xiaoyun Li , Junyu Jiang , stable@dpdk.org Date: Wed, 26 Feb 2020 08:35:25 +0000 Message-Id: <20200226083525.68649-1-junyux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226075748.67911-1-junyux.jiang@intel.com> References: <20200226075748.67911-1-junyux.jiang@intel.com> Subject: [dpdk-dev] [PATCH v2] 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..dcba3a708 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 % (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