From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (unknown [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F332460A5; Fri, 17 Jan 2025 09:43:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A32F4278C; Fri, 17 Jan 2025 09:43:05 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 273E04029C for ; Fri, 17 Jan 2025 09:43:03 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4YZCpX6ypcz2DkJt; Fri, 17 Jan 2025 16:39:48 +0800 (CST) Received: from dggemv711-chm.china.huawei.com (unknown [10.1.198.66]) by mail.maildlp.com (Postfix) with ESMTPS id B5E8B1A016C; Fri, 17 Jan 2025 16:43:01 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 17 Jan 2025 16:43:01 +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; Fri, 17 Jan 2025 16:43:00 +0800 Message-ID: <8d3d7a3e-9dc7-633d-c05a-c45d118e63c5@huawei.com> Date: Fri, 17 Jan 2025 16:43:00 +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 v2 1/2] ethdev: clarify something about the new event To: Stephen Hemminger CC: , , References: <20250115034110.15245-1-lihuisong@huawei.com> <20250116114034.9858-1-lihuisong@huawei.com> <20250116114034.9858-2-lihuisong@huawei.com> <20250116103124.4613298f@hermes.local> From: "lihuisong (C)" In-Reply-To: <20250116103124.4613298f@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] 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 在 2025/1/17 2:31, Stephen Hemminger 写道: > On Thu, 16 Jan 2025 19:40:33 +0800 > Huisong Li wrote: > >> 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. >> >> In case of similar confusion, this patch have to clarify something about >> RTE_ETH_EVENT_NEW in code. >> >> Signed-off-by: Huisong Li >> --- >> lib/ethdev/rte_ethdev.h | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h >> index 1f71cad244..ee7197aa97 100644 >> --- a/lib/ethdev/rte_ethdev.h >> +++ b/lib/ethdev/rte_ethdev.h >> @@ -4128,7 +4128,11 @@ 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 */ >> + /** The port is being probed, i.e. allocated and not yet available. >> + * It is too early to check validity, query infos, and configure >> + * the port. >> + */ >> + RTE_ETH_EVENT_NEW, >> RTE_ETH_EVENT_DESTROY, /**< port is released */ >> RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ >> RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */ > All the comments in event_type need some editing to make them more > readable. It is good style when having a list to make sure that > each item in a list agrees in terms of wording, verb tense, > capitalization, description, etc. I am not sure if it is appropriate just to modify the event type comments. After all, it is common issue in doc. > > This can be addressed by a later patch, ideally by looking > at the resulting API doc and fixing the source to match.