From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35FB7C433E7 for ; Tue, 20 Oct 2020 08:26:01 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 24FD2222C8 for ; Tue, 20 Oct 2020 08:25:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24FD2222C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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