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 03CAAA04DD for ; Wed, 28 Oct 2020 11:50:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA3BBCA12; Wed, 28 Oct 2020 11:50:52 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 537FBCA0C for ; Wed, 28 Oct 2020 11:50:50 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id n18so5162294wrs.5 for ; Wed, 28 Oct 2020 03:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XtJonk22aEVeSDHBt9dWefvTNYMrs6LvW7RdP5Tpyn4=; b=n4u8Fn8HGVdHvJzP+uP3WTtcwyEP6XsVk7X8TQeylRivZbNS64IF6R7SLAfBxZAMsN 7q2bq6EYwMMhIUOWoi9EBU+YFZHKF00xWl4Hy1kyfl0kjn4t8zV7ikjdJHto3t6+zpnO DSPdyjaD6YuCPR8+dW/4BQWY/bxSjbR42haK3iK4lCV+1e3vwP02/ztOIaU17zg8HrpZ 6cK74Q84h3FIFap7HgXPffq4F8INbzg9G+qWYOrtKKqhuFOl41STkROMkR58b1rhUdLF FllmA1fAFZCV8nrQUAQshMfjyKnLc8CdUAg5R+DNgH6V8lPr9XkL5OvTNza2gn94vApg Hppg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XtJonk22aEVeSDHBt9dWefvTNYMrs6LvW7RdP5Tpyn4=; b=UV1r/Gkydn4AdEURcOYZ9UhaBtghlxCbGVd94m67i39u5EJ6qqpThmsf1F770EJO7+ 7JKs8pHxHlWSFUW7lby2oCHs34yAbwTvJWUZ7j0TelyLms5FX5K5nD9btved4P8ew/Ei EDmAOnlwoK1kcPJYNjReMazvcHBjz/CxZNy1rg7c77TRiNL69bIHp56s5WgUoPGHvejR NkoXYRnJnsYSiLS+Bqnjhe/l1iIsTkER4SHbjXopXEmuGy6NBcc+AWyidsany4YYCJut 24cr8H4c8CkdhRf/2sFKkZaMsTXoMezrQfYZfTipxxDIfHhQEmbOKfsQndp7mhXlZomg /25g== X-Gm-Message-State: AOAM533NBi2AKIqpirtE3Aya32yNXzbLpX9lg4nxufQsBM2xAN4kVoTH EBR5vog6nXErL3jon79rgHw= X-Google-Smtp-Source: ABdhPJypZCt52N6c1IEgY5MuAA+RksTHWoPpgx4uJt8Yx9wjK9f+5B+g6sh2xchuQccdzGAvdxcuuA== X-Received: by 2002:a5d:6784:: with SMTP id v4mr3997927wru.346.1603882250067; Wed, 28 Oct 2020 03:50:50 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s2sm6505127wmh.9.2020.10.28.03.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:50:49 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Wei Hu , Ferruh Yigit , dpdk stable Date: Wed, 28 Oct 2020 10:44:09 +0000 Message-Id: <20201028104606.3504127-90-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/testpmd: fix displaying Rx/Tx queues information' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From d2e8ae537ec001139495c335d754db403b82f7f7 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 25 Sep 2020 20:47:19 +0800 Subject: [PATCH] app/testpmd: fix displaying Rx/Tx queues information [ upstream commit 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d ] Currently, the information of Rx/Tx queues from PMD driver is not displayed exactly in the rxtx_config_display function. Because "ports[pid].rx_conf" and "ports[pid].tx_conf" maintained in testpmd application may be not the value actually used by PMD driver. For instance, user does not set a field, but PMD driver has to use the default value. This patch fixes rxtx_config_display so that the information of Rx/Tx queues can be really displayed for the PMD driver that implement .rxq_info_get and .txq_info_get ops callback function. Fixes: 75c530c1bd53 ("app/testpmd: fix port configuration print") Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) Reviewed-by: Ferruh Yigit --- app/test-pmd/config.c | 64 +++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index e1c7143586..343402f172 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1955,10 +1955,17 @@ rxtx_config_display(void) 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; + uint16_t rx_free_thresh_tmp; + uint16_t tx_free_thresh_tmp; + uint16_t tx_rs_thresh_tmp; + uint16_t nb_rx_desc_tmp; + uint16_t nb_tx_desc_tmp; + uint64_t offloads_tmp; + uint8_t pthresh_tmp; + uint8_t hthresh_tmp; + uint8_t wthresh_tmp; int32_t rc; /* per port config */ @@ -1972,41 +1979,64 @@ rxtx_config_display(void) /* 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) + if (rc) { nb_rx_desc_tmp = nb_rx_desc[qid]; - else + rx_free_thresh_tmp = + rx_conf[qid].rx_free_thresh; + pthresh_tmp = rx_conf[qid].rx_thresh.pthresh; + hthresh_tmp = rx_conf[qid].rx_thresh.hthresh; + wthresh_tmp = rx_conf[qid].rx_thresh.wthresh; + offloads_tmp = rx_conf[qid].offloads; + } else { nb_rx_desc_tmp = rx_qinfo.nb_desc; + rx_free_thresh_tmp = + rx_qinfo.conf.rx_free_thresh; + pthresh_tmp = rx_qinfo.conf.rx_thresh.pthresh; + hthresh_tmp = rx_qinfo.conf.rx_thresh.hthresh; + wthresh_tmp = rx_qinfo.conf.rx_thresh.wthresh; + offloads_tmp = rx_qinfo.conf.offloads; + } printf(" RX queue: %d\n", qid); printf(" RX desc=%d - RX free threshold=%d\n", - nb_rx_desc_tmp, rx_conf[qid].rx_free_thresh); + nb_rx_desc_tmp, rx_free_thresh_tmp); printf(" RX threshold registers: pthresh=%d hthresh=%d " " wthresh=%d\n", - rx_conf[qid].rx_thresh.pthresh, - rx_conf[qid].rx_thresh.hthresh, - rx_conf[qid].rx_thresh.wthresh); - printf(" RX Offloads=0x%"PRIx64"\n", - rx_conf[qid].offloads); + pthresh_tmp, hthresh_tmp, wthresh_tmp); + printf(" RX Offloads=0x%"PRIx64"\n", offloads_tmp); } /* 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) + if (rc) { nb_tx_desc_tmp = nb_tx_desc[qid]; - else + tx_free_thresh_tmp = + tx_conf[qid].tx_free_thresh; + pthresh_tmp = tx_conf[qid].tx_thresh.pthresh; + hthresh_tmp = tx_conf[qid].tx_thresh.hthresh; + wthresh_tmp = tx_conf[qid].tx_thresh.wthresh; + offloads_tmp = tx_conf[qid].offloads; + tx_rs_thresh_tmp = tx_conf[qid].tx_rs_thresh; + } else { nb_tx_desc_tmp = tx_qinfo.nb_desc; + tx_free_thresh_tmp = + tx_qinfo.conf.tx_free_thresh; + pthresh_tmp = tx_qinfo.conf.tx_thresh.pthresh; + hthresh_tmp = tx_qinfo.conf.tx_thresh.hthresh; + wthresh_tmp = tx_qinfo.conf.tx_thresh.wthresh; + offloads_tmp = tx_qinfo.conf.offloads; + tx_rs_thresh_tmp = tx_qinfo.conf.tx_rs_thresh; + } printf(" TX queue: %d\n", qid); printf(" TX desc=%d - TX free threshold=%d\n", - nb_tx_desc_tmp, tx_conf[qid].tx_free_thresh); + nb_tx_desc_tmp, tx_free_thresh_tmp); printf(" TX threshold registers: pthresh=%d hthresh=%d " " wthresh=%d\n", - tx_conf[qid].tx_thresh.pthresh, - tx_conf[qid].tx_thresh.hthresh, - tx_conf[qid].tx_thresh.wthresh); + pthresh_tmp, hthresh_tmp, wthresh_tmp); printf(" TX offloads=0x%"PRIx64" - TX RS bit threshold=%d\n", - tx_conf[qid].offloads, tx_conf->tx_rs_thresh); + offloads_tmp, tx_rs_thresh_tmp); } } } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:14.578095747 +0000 +++ 0090-app-testpmd-fix-displaying-Rx-Tx-queues-information.patch 2020-10-28 10:35:11.636831967 +0000 @@ -1,8 +1,10 @@ -From 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d Mon Sep 17 00:00:00 2001 +From d2e8ae537ec001139495c335d754db403b82f7f7 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 25 Sep 2020 20:47:19 +0800 Subject: [PATCH] app/testpmd: fix displaying Rx/Tx queues information +[ upstream commit 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d ] + Currently, the information of Rx/Tx queues from PMD driver is not displayed exactly in the rxtx_config_display function. Because "ports[pid].rx_conf" and "ports[pid].tx_conf" maintained in testpmd @@ -16,7 +18,6 @@ Fixes: 75c530c1bd53 ("app/testpmd: fix port configuration print") Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") -Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Wei Hu (Xavier) @@ -26,10 +27,10 @@ 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c -index 0b655368b8..470c68567a 100644 +index e1c7143586..343402f172 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c -@@ -2280,10 +2280,17 @@ rxtx_config_display(void) +@@ -1955,10 +1955,17 @@ rxtx_config_display(void) 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]; @@ -49,7 +50,7 @@ int32_t rc; /* per port config */ -@@ -2297,41 +2304,64 @@ rxtx_config_display(void) +@@ -1972,41 +1979,64 @@ rxtx_config_display(void) /* 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);