From: Thomas Monjalon <thomas@monjalon.net>
To: "lihuisong (C)" <lihuisong@huawei.com>
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: Thu, 16 Jan 2025 10:15:38 +0100 [thread overview]
Message-ID: <3006817.VdNmn5OnKV@thomas> (raw)
In-Reply-To: <363b8b06-652b-26e2-fc7e-30e22c916181@huawei.com>
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 <lihuisong@huawei.com>
> >> ---
> >> 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.
next prev parent reply other threads:[~2025-01-16 9:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 3:41 [PATCH v1 0/2] ethdev: clarify something about " Huisong Li
2025-01-15 3:41 ` [PATCH v1 1/2] ethdev: clarify do not something in the " Huisong Li
2025-01-15 11:31 ` Thomas Monjalon
2025-01-16 6:16 ` lihuisong (C)
2025-01-16 9:15 ` Thomas Monjalon [this message]
2025-01-16 9:35 ` lihuisong (C)
2025-01-15 3:41 ` [PATCH v1 2/2] ethdev: fix some APIs can be used " Huisong Li
2025-01-15 11:36 ` Thomas Monjalon
2025-01-16 6:14 ` lihuisong (C)
2025-01-16 9:09 ` Thomas Monjalon
2025-01-16 9:35 ` lihuisong (C)
2025-01-16 11:40 ` [PATCH v2 0/2] ethdev: clarify something about " Huisong Li
2025-01-16 11:40 ` [PATCH v2 1/2] ethdev: clarify something about the " Huisong Li
2025-01-16 11:40 ` [PATCH v2 2/2] ethdev: fix some functions are available in " Huisong Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3006817.VdNmn5OnKV@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=lihuisong@huawei.com \
--cc=liuyonglong@huawei.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).