From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 11E072BC9 for ; Tue, 22 May 2018 17:10:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 08:10:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,430,1520924400"; d="scan'208";a="51282689" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by FMSMGA003.fm.intel.com with ESMTP; 22 May 2018 08:10:40 -0700 From: Bernard Iremonger To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Bernard Iremonger Date: Tue, 22 May 2018 16:10:38 +0100 Message-Id: <1527001838-1605-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1526984578-11712-1-git-send-email-bernard.iremonger@intel.com> References: <1526984578-11712-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v4] app/testpmd: fix log of start command 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: , X-List-Received-Date: Tue, 22 May 2018 15:10:45 -0000 Call the rte_eth_rxq_info_get() and rte_eth_txq_info_get() functions to update the number of rx and tx descriptors. Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") Signed-off-by: Bernard Iremonger --- app/test-pmd/config.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 4520084..97020fb 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1839,6 +1839,11 @@ struct igb_ring_desc_16_bytes { struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0]; uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0]; uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0]; + uint16_t nb_rx_desc_tmp; + uint16_t nb_tx_desc_tmp; + struct rte_eth_rxq_info rx_qinfo; + struct rte_eth_txq_info tx_qinfo; + int32_t rc; /* per port config */ printf(" port %d: RX queue number: %d Tx queue number: %d\n", @@ -1850,9 +1855,15 @@ struct igb_ring_desc_16_bytes { /* per rx queue config only for first queue to be less verbose */ for (qid = 0; qid < 1; qid++) { + rc = rte_eth_rx_queue_info_get(pid, qid, &rx_qinfo); + if (rc) + nb_rx_desc_tmp = nb_rx_desc[qid]; + else + nb_rx_desc_tmp = rx_qinfo.nb_desc; + printf(" RX queue: %d\n", qid); printf(" RX desc=%d - RX free threshold=%d\n", - nb_rx_desc[qid], rx_conf[qid].rx_free_thresh); + nb_rx_desc_tmp, rx_conf[qid].rx_free_thresh); printf(" RX threshold registers: pthresh=%d hthresh=%d " " wthresh=%d\n", rx_conf[qid].rx_thresh.pthresh, @@ -1864,9 +1875,15 @@ struct igb_ring_desc_16_bytes { /* per tx queue config only for first queue to be less verbose */ for (qid = 0; qid < 1; qid++) { + rc = rte_eth_tx_queue_info_get(pid, qid, &tx_qinfo); + if (rc) + nb_tx_desc_tmp = nb_tx_desc[qid]; + else + nb_tx_desc_tmp = tx_qinfo.nb_desc; + printf(" TX queue: %d\n", qid); printf(" TX desc=%d - TX free threshold=%d\n", - nb_tx_desc[qid], tx_conf[qid].tx_free_thresh); + nb_tx_desc_tmp, tx_conf[qid].tx_free_thresh); printf(" TX threshold registers: pthresh=%d hthresh=%d " " wthresh=%d\n", tx_conf[qid].tx_thresh.pthresh, -- 1.9.1