From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7516446064; Mon, 13 Jan 2025 04:07:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 971F340685; Mon, 13 Jan 2025 04:07:23 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id A9ED74067C for ; Mon, 13 Jan 2025 04:07:21 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4YWcXN1DY5z1W3yk; Mon, 13 Jan 2025 11:03:32 +0800 (CST) Received: from dggemv704-chm.china.huawei.com (unknown [10.3.19.47]) by mail.maildlp.com (Postfix) with ESMTPS id 08B48180330; Mon, 13 Jan 2025 11:07:20 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 13 Jan 2025 11:07:14 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 13 Jan 2025 11:07:13 +0800 From: Huisong Li To: , , , CC: , , Subject: [PATCH v1 0/2] ethdev: fix skip valid port in probing callback Date: Mon, 13 Jan 2025 10:55:19 +0800 Message-ID: <20250113025521.32703-1-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemn100009.china.huawei.com (7.202.194.112) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org After we check the validity of the port in eth_event_callback() of testpmd like patch 1/2, testpmd attach one port and doesn't update total port number maintained in testmd. See the following log: --- testpmd> testpmd> port attach 0000:7d:00.1 Attaching a new port... testpmd> testpmd> port start all Port 0 is now not stopped ETHDEV: Device with port_id=1 is not configured. Fail to start port 1: Invalid argument Done --- For details about the root cause of this issue, please see the patch 2/2. After merging the patch 2/2. this issue can be fixed and the log is as follows: --- testpmd> testpmd> port attach 0000:7d:00.1 Attaching a new port... Port 1 is attached. Now total ports is 2 Done --- BTW, the modification method for this issue is from the following thread. https://mails.dpdk.org/archives/dev/2024-January/286026.html Huisong Li (2): app/testpmd: check the validity of the port ethdev: fix skip valid port in probing callback app/test-pmd/testpmd.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/cpfl/cpfl_ethdev.h | 2 +- drivers/net/ionic/ionic_ethdev.c | 2 +- drivers/net/mlx5/mlx5.c | 2 +- drivers/net/nfp/nfp_ethdev.c | 4 ++-- lib/ethdev/ethdev_driver.c | 13 ++++++++++--- lib/ethdev/ethdev_driver.h | 12 ++++++++++++ lib/ethdev/ethdev_pci.h | 2 +- lib/ethdev/rte_class_eth.c | 2 +- lib/ethdev/rte_ethdev.c | 4 ++-- lib/ethdev/rte_ethdev.h | 4 +++- lib/ethdev/version.map | 1 + 13 files changed, 39 insertions(+), 16 deletions(-) -- 2.22.0