From: Jun Yang <[email protected]>

The eventdev_port_link_t, eventdev_port_link_profile_t,
eventdev_port_unlink_t and eventdev_port_unlink_profile_t PMD callbacks
return the number of links (or unlinks) successfully established, and a
negative value on failure. This matches the rte_event_port_link() and
rte_event_port_unlink() public API contract and the existing driver
implementations.

The Doxygen comments incorrectly stated that these callbacks "Returns 0
on success", which is misleading for PMD authors and inconsistent with
the actual behaviour. Update the documentation to describe the real
return semantics.

Signed-off-by: Jun Yang <[email protected]>
---
 lib/eventdev/eventdev_pmd.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 9309dce5e1..fcf9b6922d 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2016 Cavium, Inc
+ * Copyright 2026 NXP
  */
 
 #ifndef _RTE_EVENTDEV_PMD_H_
@@ -441,7 +442,7 @@ typedef void (*eventdev_port_quiesce_t)(struct rte_eventdev 
*dev, void *port,
  *   The number of links to establish
  *
  * @return
- *   Returns 0 on success.
+ *   Number of links successfully established, or a negative value on failure.
  */
 typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port,
                const uint8_t queues[], const uint8_t priorities[],
@@ -467,7 +468,7 @@ typedef int (*eventdev_port_link_t)(struct rte_eventdev 
*dev, void *port,
  *   The profile ID to associate the links.
  *
  * @return
- *   Returns 0 on success.
+ *   Number of links successfully established, or a negative value on failure.
  */
 typedef int (*eventdev_port_link_profile_t)(struct rte_eventdev *dev, void 
*port,
                                            const uint8_t queues[], const 
uint8_t priorities[],
@@ -486,7 +487,7 @@ typedef int (*eventdev_port_link_profile_t)(struct 
rte_eventdev *dev, void *port
  *   The number of unlinks to establish
  *
  * @return
- *   Returns 0 on success.
+ *   Number of unlinks successfully established, or a negative value on 
failure.
  */
 typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port,
                uint8_t queues[], uint16_t nb_unlinks);
@@ -507,7 +508,7 @@ typedef int (*eventdev_port_unlink_t)(struct rte_eventdev 
*dev, void *port,
  *   The profile ID of the associated links.
  *
  * @return
- *   Returns 0 on success.
+ *   Number of unlinks successfully established, or a negative value on 
failure.
  */
 typedef int (*eventdev_port_unlink_profile_t)(struct rte_eventdev *dev, void 
*port,
                                              uint8_t queues[], uint16_t 
nb_unlinks,
-- 
2.43.0

Reply via email to