[v3,1/2] ethdev: clarify something about the new event
Checks
Commit Message
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 <lihuisong@huawei.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
lib/ethdev/rte_ethdev.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -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 */