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>,
Subject: [dpdk-dev] [RFC 2/2] app/testpmd: fix starting failed with queue-stats-mapping
Date: Tue, 20 Oct 2020 15:30:48 +0800
Message-ID: <1603179048-30400-3-git-send-email-humin29@huawei.com> (raw)
In-Reply-To: <1603179048-30400-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)
-		map_port_queue_stats_mapping_registers(pid, port);

      parent reply	other threads:[~2020-10-20  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  7:30 [dpdk-dev] [RFC 0/2] fix queue stats mapping Min Hu (Connor)
2020-10-20  7:30 ` [dpdk-dev] [RFC 1/2] app/testpmd: fix queue stats mapping configuration Min Hu (Connor)
2020-10-20  7:30 ` 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:

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

  git send-email \
    --in-reply-to=1603179048-30400-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=thomas.monjalon@6wind.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git