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 EB714A04DC; Tue, 20 Oct 2020 10:26:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73AB5BB96; Tue, 20 Oct 2020 10:25:57 +0200 (CEST) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by dpdk.org (Postfix) with ESMTP id 0CEAFBB04 for ; Tue, 20 Oct 2020 10:25:56 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id CD66FCED3B1111DAB9FD; Tue, 20 Oct 2020 16:25:53 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 20 Oct 2020 16:25:46 +0800 From: "Min Hu (Connor)" To: CC: , , , Date: Tue, 20 Oct 2020 16:26:29 +0800 Message-ID: <1603182389-10087-3-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1603182389-10087-1-git-send-email-humin29@huawei.com> References: <1603182389-10087-1-git-send-email-humin29@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [RFC V2 2/2] app/testpmd: fix starting failed with queue-stats-mapping X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Huisong Li 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 --- 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