[RFC,2/2] app/testpmd: fix starting failed with queue-stats-mapping
Checks
Commit Message
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(-)
@@ -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