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 E25594609E; Thu, 16 Jan 2025 10:35:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE3D240613; Thu, 16 Jan 2025 10:35:15 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 356314025F for ; Thu, 16 Jan 2025 10:35:14 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4YYd1M45C8z11Sdd; Thu, 16 Jan 2025 17:32:07 +0800 (CST) Received: from dggemv703-chm.china.huawei.com (unknown [10.3.19.46]) by mail.maildlp.com (Postfix) with ESMTPS id F348C1400FF; Thu, 16 Jan 2025 17:35:10 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 16 Jan 2025 17:35:10 +0800 Received: from [10.67.121.59] (10.67.121.59) 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; Thu, 16 Jan 2025 17:35:10 +0800 Message-ID: <6487f9d2-3b58-e863-73c6-6e7705e8a23b@huawei.com> Date: Thu, 16 Jan 2025 17:35:09 +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 v1 1/2] ethdev: clarify do not something in the new event To: Thomas Monjalon CC: , , References: <20250115034110.15245-1-lihuisong@huawei.com> <2135427.KlZ2vcFHjT@thomas> <363b8b06-652b-26e2-fc7e-30e22c916181@huawei.com> <3006817.VdNmn5OnKV@thomas> From: "lihuisong (C)" In-Reply-To: <3006817.VdNmn5OnKV@thomas> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 在 2025/1/16 17:15, Thomas Monjalon 写道: > 16/01/2025 07:16, lihuisong (C): >> 在 2025/1/15 19:31, Thomas Monjalon 写道: >>> 15/01/2025 04:41, Huisong Li: >>>> If application verify the validity of the port id or configure this port in >>>> the new event callback, application may happen to the port id is invalid. >>>> >>>> Actually, when application receive a new event from one port, the port is >>>> not fully probed and is just in allocated state. Application doesn't need >>>> to verify the validity of the port id because it is definitely valid. >>>> What's more, application shouldn't do something like configuring this port >>>> or querying some information of this port by ethdev ops. >>>> >>>> Signed-off-by: Huisong Li >>>> --- >>>> lib/ethdev/rte_ethdev.h | 9 ++++++++- >>>> 1 file changed, 8 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >>>> index 1f71cad244..e2021f0f12 100644 >>>> --- a/lib/ethdev/rte_ethdev.h >>>> +++ b/lib/ethdev/rte_ethdev.h >>>> @@ -4128,7 +4128,14 @@ enum rte_eth_event_type { >>>> RTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by PF */ >>>> RTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */ >>>> RTE_ETH_EVENT_INTR_RMV, /**< device removal event */ >>>> - RTE_ETH_EVENT_NEW, /**< port is probed */ >>>> + /** Port is probed and application's event callback will be called. >>> We are not going to say that the callback is called for each event :) >>> >>>> + * In this moment, the port is not fully probed and is just in allocated >>>> + * state. When application receive this event, application doesn't need >>> It is not a real state. >>> >>>> + * to verify the validity of the port id because it is definitely valid. >>>> + * What's more, application shouldn't do something like configuring this >>>> + * port or querying some information of this port by ethdev ops. >>>> + */ >>> Let me try shorter: >>> " >>> The port is being probed, i.e. allocated and not yet available. >>> It is too early to check validity, infos, or configuring the port. >>> " >> " >> The port is being probed, i.e. allocated and not yet available. >> It is too early to check validity, query infos, or configure the port. >> But the socket id and owner id related to this port can be considered as >> valid. >> " >> How about use above comments? > The last sentence should be in patch 2. > And I am not sure about saying they are valid. > It is more accurate to say that the functions for socket id and owner id are available. Ack > > > .