Skip to contentSkip to conversation

ethdev: rename a flow shared action error code

PATCH Applied Thomas Monjalon 3 participants 3 messages Nov 20, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: rename a flow shared action error code

In the experimental function rte_flow_shared_action_destroy() introduced in DPDK 20.11, the errno ETOOMANYREFS was used. This errno is not always available on Windows,
so it is preferred using EBUSY instead.

---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 lib/librte_ethdev/rte_flow.h    | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_flow_dv.c +2 -2
index 62d9ca9ffb..51cc41face 100644
@@ -11436,14 +11436,14 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev, uint32_t idx,
 					  "invalid shared action");
 	remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
 	if (remaining)
-		return rte_flow_error_set(error, ETOOMANYREFS,
+		return rte_flow_error_set(error, EBUSY,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "shared rss hrxq has references");
 	if (!__atomic_compare_exchange_n(&shared_rss->refcnt, &old_refcnt,
 					 0, 0, __ATOMIC_ACQUIRE,
 					 __ATOMIC_RELAXED))
-		return rte_flow_error_set(error, ETOOMANYREFS,
+		return rte_flow_error_set(error, EBUSY,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "shared rss has references");
lib/librte_ethdev/rte_flow.h +1 -2
index 8b970ba0b7..b98334c5c4 100644
@@ -3549,8 +3549,7 @@ rte_flow_shared_action_create(uint16_t port_id,
  *   - (-ENOSYS) if underlying device does not support this functionality.
  *   - (-EIO) if underlying device is removed.
  *   - (-ENOENT) if action pointed by *action* handle was not found.
- *   - (-ETOOMANYREFS) if action pointed by *action* handle still used by one or
- *     more rules
+ *   - (-EBUSY) if action pointed by *action* handle still used by some rules
  *   rte_errno is also set.
  */
 __rte_experimental
Signature · 1 line
2.28.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 47 lines

Subject: [PATCH 1/1] ethdev: rename a flow shared action error code

External email: Use caution opening links or attachments

In the experimental function rte_flow_shared_action_destroy() introduced in DPDK 20.11, the errno ETOOMANYREFS was used.
This errno is not always available on Windows, so it is preferred using EBUSY instead.

---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 lib/librte_ethdev/rte_flow.h    | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/net/mlx5/mlx5_flow_dv.c index 62d9ca9ffb..51cc41face 100644

drivers/net/mlx5/mlx5_flow_dv.c +2 -2
@@ -11436,14 +11436,14 @@ __flow_dv_action_rss_release(struct
 rte_eth_dev *dev, uint32_t idx,
                                          "invalid shared action");
        remaining = __flow_dv_action_rss_hrxqs_release(dev, shared_rss);
        if (remaining)
-               return rte_flow_error_set(error, ETOOMANYREFS,
+               return rte_flow_error_set(error, EBUSY,
                                          RTE_FLOW_ERROR_TYPE_ACTION,
                                          NULL,
                                          "shared rss hrxq has references");
        if (!__atomic_compare_exchange_n(&shared_rss->refcnt, &old_refcnt,
                                         0, 0, __ATOMIC_ACQUIRE,
                                         __ATOMIC_RELAXED))
-               return rte_flow_error_set(error, ETOOMANYREFS,
+               return rte_flow_error_set(error, EBUSY,
                                          RTE_FLOW_ERROR_TYPE_ACTION,
                                          NULL,

"shared rss has references"); diff --git
a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 8b970ba0b7..b98334c5c4 100644

lib/librte_ethdev/rte_flow.h +0 -1
@@ -3549,8 +3549,7 @@ rte_flow_shared_action_create(uint16_t port_id,
  *   - (-ENOSYS) if underlying device does not support this functionality.
  *   - (-EIO) if underlying device is removed.
  *   - (-ENOENT) if action pointed by *action* handle was not found.
- *   - (-ETOOMANYREFS) if action pointed by *action* handle still used by
Quoted 8 lines

one or
- * more rules
+ * - (-EBUSY) if action pointed by *action* handle still used by some rules
* rte_errno is also set.
*/
__rte_experimental
--
2.28.0

Reviewed-by Applied
#2 lore raw
Quoted 10 lines · Tal Shnaiderman
Quoted 10 lines

Subject: [PATCH 1/1] ethdev: rename a flow shared action error code

External email: Use caution opening links or attachments

In the experimental function rte_flow_shared_action_destroy() introduced in DPDK 20.11, the errno ETOOMANYREFS was used.
This errno is not always available on Windows, so it is preferred using EBUSY instead.

Quoted 5 lines
Quoted 1 line

Applied to dpdk-next-net/main, thanks.