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 4FE22460A4; Thu, 16 Jan 2025 19:31:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B50D40E15; Thu, 16 Jan 2025 19:31:28 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 4BF93402D6 for ; Thu, 16 Jan 2025 19:31:27 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-21628b3fe7dso23800395ad.3 for ; Thu, 16 Jan 2025 10:31:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737052286; x=1737657086; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=gRVk8mkCCAZfZx97HsKQrrosiYNqbYGaP+3OI639Ui0=; b=CEPfTCNh7PFMuyHyz6kh/VGWuGYBZd19EEW/4+1yCRDVKmnhHh/umGHgdEVpx8/B9Q nPe47tVQkU8l5SQBL0T5PY5CizPRu0xlorRJIoyiTBs8KaBxoz9cz6qxUCmt/+Miq8Cn x8XvGvvepnU4hJVqZA6jKpO5Jsk91HNdy3Zg+OCDqIzAn4fhOvkPiJQ4piXnU+sRBKa0 k6YH/IXdqYj4IDxxBFaKLK75bjgNA0qJgsL3SOlg7HQxZGhi2Uc6GlAoL2FPL8prXuw/ pQ0iiNISjJ8Vc6rKh7pjLQv8NPtLWkBzemWfMrG6lX9kJtcbBlEDu+S8uuHg3EXO09w5 VNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737052286; x=1737657086; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gRVk8mkCCAZfZx97HsKQrrosiYNqbYGaP+3OI639Ui0=; b=lRPJHBF+dGJYrTa9u1xP/20/z9vizSgej8nUAOm1E7Gly119Q7mBWenL+WczUOh5oX zGJIkxzR56/3TaGRiGUMBmwdZmF6+lzEutIzC59lpNbaLobECI15ogSHJPUnd5F0BXer 353B70qr7e0rIsDRKmoR/eXipsIatEW8mQd0zo0+1AvdW15XRlm5+dfqGjx5waaLTrUO s/iWkm4/G1LLrMDJl/4kwMfV3sI489ROAZ2RI8AiPnlu66/zRUWVk9WktuD0k2V8YGEn yukWcBaXvh3YEpiveeuCYcBBkdqzgMEG1lMMHoSOq1oZK6pLcTWn6GLtFcIcXu5mM9Yh v1TQ== X-Gm-Message-State: AOJu0YzP7adFSZWIvKRKMhsFByfSBkUu0htxy6oqwZ0Y2nrEKeY6ZcPJ eNxdmNO/QyXbQ0BwIk5zO5jFuY8YVe0gprhbnfA7WANYxp/CuD1WUUP06Gcgw8M= X-Gm-Gg: ASbGncs8YsGW52YtmcaIajKg3iYdYf8B8Fu3YJ1cU8Iwj38dnmWMswymSwqjtvVuUMP K/xZrhG+wO4sfAZxRVgYMzdQBEDM5aCfZ3ShBr/hL4XxJQd2Ats4myOA/LHB2oEsRrlSaty3H/G bHCyh6M9jhAIXqXldK2bNC08jNxUhOP2D4iqU1a69sMOBe9DBk5S+GKyplhmHA5s7lvOlXnVwHf oBOlMbzNlAUZTgoBMSicvjFUs6FgJI2pBVrLw6e9Hm5a77mMYguQtipA2PyzBtBQO8jlBoaJ6uQ dAZaTJX1q65+HCC/tU2IVaWsFo7UTqAHJQ== X-Google-Smtp-Source: AGHT+IGdVUobhHuEa13PCtR+QbHW9VuXfdo9dXVL6ipZOftGaFBKfErPoPaS+qt9wm+RaU6sIdRFTQ== X-Received: by 2002:a05:6a21:9102:b0:1e1:a07f:9679 with SMTP id adf61e73a8af0-1e88d0a2a8fmr52833792637.4.1737052286296; Thu, 16 Jan 2025 10:31:26 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dab7f1b6csm342871b3a.14.2025.01.16.10.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2025 10:31:26 -0800 (PST) Date: Thu, 16 Jan 2025 10:31:24 -0800 From: Stephen Hemminger To: Huisong Li Cc: , , Subject: Re: [PATCH v2 1/2] ethdev: clarify something about the new event Message-ID: <20250116103124.4613298f@hermes.local> In-Reply-To: <20250116114034.9858-2-lihuisong@huawei.com> References: <20250115034110.15245-1-lihuisong@huawei.com> <20250116114034.9858-1-lihuisong@huawei.com> <20250116114034.9858-2-lihuisong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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. This can be addressed by a later patch, ideally by looking at the resulting API doc and fixing the source to match.