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 C6D3842BAE; Sat, 27 May 2023 03:58:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 424AC40DFB; Sat, 27 May 2023 03:58:22 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 6ED0A40A7A for ; Sat, 27 May 2023 03:58:21 +0200 (CEST) Received: from kwepemm600004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QSlJ722ShzsSTx; Sat, 27 May 2023 09:56:07 +0800 (CST) Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 27 May 2023 09:58:16 +0800 Message-ID: <1bd81e80-ae6d-c1c2-0396-4d6851ed8aff@huawei.com> Date: Sat, 27 May 2023 09:58:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V5 2/5] ethdev: fix skip valid port in probing callback To: fengchengwen , CC: , , , , References: <20220825024425.10534-1-lihuisong@huawei.com> <20230131033317.2155-1-lihuisong@huawei.com> <20230131033317.2155-3-lihuisong@huawei.com> From: "lihuisong (C)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 在 2023/5/22 19:04, fengchengwen 写道: > On 2023/1/31 11:33, Huisong Li wrote: >> The event callback in application may use the macro RTE_ETH_FOREACH_DEV to >> iterate over all enabled ports to do something(like, verifying the port id >> validity) when receive a probing event. If the ethdev state of a port is >> not RTE_ETH_DEV_UNUSED, this port will be considered as a valid port. >> >> However, this state is set to RTE_ETH_DEV_ATTACHED after pushing probing >> event. It means that probing callback will skip this port. But this >> assignment can not move to front of probing notification. See >> commit be8cd210379a ("ethdev: fix port probing notification") > ... > >> >> struct rte_eth_dev_sriov { >> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map >> index 17201fbe0f..094c2a952e 100644 >> --- a/lib/ethdev/version.map >> +++ b/lib/ethdev/version.map >> @@ -327,4 +327,5 @@ INTERNAL { >> rte_eth_representor_id_get; >> rte_eth_switch_domain_alloc; >> rte_eth_switch_domain_free; >> + rte_eth_dev_is_used; > requires alphabetical order. Thanks, will fix it in v6. > >> }; >> > .