From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernard Iremonger Subject: [PATCH v3] app/testpmd: fix log of start command Date: Tue, 22 May 2018 11:22:58 +0100 Message-ID: <1526984578-11712-1-git-send-email-bernard.iremonger@intel.com> References: <1526909296-28215-1-git-send-email-bernard.iremonger@intel.com> Cc: Bernard Iremonger To: dev@dpdk.org, ferruh.yigit@intel.com Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id CCE3C1F1C for ; Tue, 22 May 2018 12:23:04 +0200 (CEST) In-Reply-To: <1526909296-28215-1-git-send-email-bernard.iremonger@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 4520084..339651f 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1839,6 +1839,9 @@ 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]; + 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,6 +1853,10 @@ 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[qid] = 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); @@ -1864,6 +1871,10 @@ 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[qid] = 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); -- 1.9.1