DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <bruce.richardson@intel.com>,
	<thomas.monjalon@6wind.com>, <lihuisong@huawei.com>
Subject: [dpdk-dev] [RFC V2 2/2] app/testpmd: fix starting failed with queue-stats-mapping
Date: Tue, 20 Oct 2020 16:26:29 +0800	[thread overview]
Message-ID: <1603182389-10087-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1603182389-10087-1-git-send-email-humin29@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

testpmd fails to start with "--rx-queue-stats-mapping" and
"--tx-queue-stats-mapping", which is caused by the failure and exit of
'map_port_queue_stats_mapping_registers' function. By default,
the configuration of queue statistics mapping in the initialization
process is implemented in the 'init_port_config' function. However,
the dev_configure interface is not called to configure the NIC
and dev->data-nb_rx/tx_queues is zero. As a result,
'rte_eth_dev_set_tx/rx_queue_stats_mapping' function fails to verify
the queue_id. Therefore, it is necessary to move
'map_port_queue_stats_mapping_registers' from 'init_port_config'
to 'start_port' function.

Fixes: 013af9b6b64f6e7 ("app/testpmd: various updates")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 86e3271..e4fe2a6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2742,6 +2742,7 @@ start_port(portid_t pid)
 		need_check_link_status = 1;
 
 		pl[cfg_pi++] = pi;
+		map_port_queue_stats_mapping_registers(pi, port);
 	}
 
 	if (need_check_link_status == 1 && !no_link_check)
@@ -3600,7 +3601,6 @@ init_port_config(void)
 		if (ret != 0)
 			return;
 
-		map_port_queue_stats_mapping_registers(pid, port);
 #if defined RTE_LIBRTE_IXGBE_PMD && defined RTE_LIBRTE_IXGBE_BYPASS
 		rte_pmd_ixgbe_bypass_init(pid);
 #endif
-- 
2.7.4


      parent reply	other threads:[~2020-10-20  8:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  8:26 [dpdk-dev] [RFC V2 0/2] fix queue stats mapping Min Hu (Connor)
2020-10-20  8:26 ` [dpdk-dev] [RFC V2 1/2] app/testpmd: fix queue stats mapping configuration Min Hu (Connor)
2020-10-30 20:54   ` Ferruh Yigit
2020-11-03  6:30     ` Min Hu (Connor)
2020-11-12  2:28       ` Min Hu (Connor)
2020-11-12  9:52         ` Ferruh Yigit
2020-11-18  3:39           ` Min Hu (Connor)
2020-11-20 11:50           ` [dpdk-dev] [RFC V4] " Min Hu (Connor)
2020-11-20 17:26             ` Ferruh Yigit
2020-11-20 23:21               ` Stephen Hemminger
2020-11-20 23:33                 ` Ferruh Yigit
2020-11-21  4:29                   ` Stephen Hemminger
2020-11-23  7:22                     ` Min Hu (Connor)
2020-11-23  9:51                     ` Ferruh Yigit
2020-11-30  8:29                       ` Min Hu (Connor)
2020-12-02 10:44                         ` Ferruh Yigit
2020-12-02 12:48                           ` [dpdk-dev] [PATCH V1] " Min Hu (Connor)
2020-12-08 15:48                             ` Ferruh Yigit
2020-12-07  1:28                           ` [dpdk-dev] [RFC V4] " Min Hu (Connor)
2020-10-20  8:26 ` Min Hu (Connor) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1603182389-10087-3-git-send-email-humin29@huawei.com \
    --to=humin29@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=lihuisong@huawei.com \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).