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 EF1FB46091; Wed, 15 Jan 2025 12:31:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BE3A4025F; Wed, 15 Jan 2025 12:31:51 +0100 (CET) Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) by mails.dpdk.org (Postfix) with ESMTP id C5C714003C for ; Wed, 15 Jan 2025 12:31:49 +0100 (CET) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id E6FDC11400F6; Wed, 15 Jan 2025 06:31:48 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 15 Jan 2025 06:31:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1736940708; x=1737027108; bh=Zn4cvXblFyKBqiLVsw5t6T9fNgj9Eh2nISdAQXUQSWo=; b= L9oejJzPZu9c8h/X+g9rYR27/pH8okTieNgmY/YaYUvmK354DaOHJd1tdb2urFBJ jFZN9E4RuAttC+tZkTkUqVCVTs39MEEDX0R3iWI2fv+IHELTLCis95+n2FpjhSQ6 JHnWIm58c44jHCMjAm6oBJIZT+zq/1IDjDMOaMgAmagLy8L1m5wf49SZXjijGp8H eOW32SdRzyJfGd6oErk+6gZj4jaWfQe+vzo/1deURWyem05jtL3MMSdJ/Lre3yNc Z92aOu/wDBaL7A6McnIoBZAbO1et0f6M4k1yX9AjbHRn/aCExLdLASQnhEj4y7cb kCE+cNae6WRx6teeCf1mzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1736940708; x= 1737027108; bh=Zn4cvXblFyKBqiLVsw5t6T9fNgj9Eh2nISdAQXUQSWo=; b=P 1cwuMM20hV5iknMECCpA5tA3d7yKfMWIAH2qlm4J1ni4wVqXKLNjgMeL0fyousMo 5gLv6KaNn1/iIz6Utkz6rLP6VNcjeHuM74z/N+/zhnqyeCCeHtSGe2T4XbUMluE3 L5piAmCHAEF+SKqn007ZyTbvPLzs2KWasyXn7eQlJ/BcBfr6D806LQkWR6gh6WD9 UCfjlG/SchmK1ng3OZmr6/obzjI+qeODppVSz7oavfaScQPMf6Pg07gHKerJ1W2f E3+I/1ULEyw0NQ2vmWAatOSYgwSN8979VKM5rarlstNkcusPiJUxE/0K+qFDbU4M 4qGP+XsSwC8aBafOHz8sw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehledgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeen ucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrg hlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdtgeek ueevjeffjeegtdeggeekgfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtpdhn sggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehlihhhuh hishhonhhgsehhuhgrfigvihdrtghomhdprhgtphhtthhopeguvghvseguphgukhdrohhr ghdprhgtphhtthhopehsthgvphhhvghnsehnvghtfihorhhkphhluhhmsggvrhdrohhrgh dprhgtphhtthhopehlihhuhihonhhglhhonhhgsehhuhgrfigvihdrtghomh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Jan 2025 06:31:47 -0500 (EST) From: Thomas Monjalon To: Huisong Li Cc: dev@dpdk.org, stephen@networkplumber.org, liuyonglong@huawei.com Subject: Re: [PATCH v1 1/2] ethdev: clarify do not something in the new event Date: Wed, 15 Jan 2025 12:31:46 +0100 Message-ID: <2135427.KlZ2vcFHjT@thomas> In-Reply-To: <20250115034110.15245-2-lihuisong@huawei.com> References: <20250115034110.15245-1-lihuisong@huawei.com> <20250115034110.15245-2-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 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. " What do you think? Anything missing?