ethdev: rename a flow shared action error code
authorThomas Monjalon <thomas@monjalon.net>
Fri, 20 Nov 2020 09:54:38 +0000 (10:54 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:05 +0000 (21:10 +0100)
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.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Tal Shnaiderman <talshn@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/mlx5/mlx5_flow_dv.c
lib/librte_ethdev/rte_flow.h

index fa2e8f2..5c01796 100644 (file)
@@ -11501,14 +11501,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");
index 8b970ba..b98334c 100644 (file)
@@ -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