DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH 1/1] ethdev: rename a flow shared action error code
@ 2020-11-20  9:54 Thomas Monjalon
  2020-11-20 10:54 ` Tal Shnaiderman
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2020-11-20  9:54 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, andreyv, talshn, dmitry.kozliuk, orika,
	Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Ferruh Yigit,
	Andrew Rybchenko

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>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
 lib/librte_ethdev/rte_flow.h    | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 62d9ca9ffb..51cc41face 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -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
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -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
-- 
2.28.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] ethdev: rename a flow shared action error code
  2020-11-20  9:54 [dpdk-dev] [PATCH 1/1] ethdev: rename a flow shared action error code Thomas Monjalon
@ 2020-11-20 10:54 ` Tal Shnaiderman
  2020-11-20 13:10   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Tal Shnaiderman @ 2020-11-20 10:54 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon, dev
  Cc: david.marchand, Andrey Vesnovaty, dmitry.kozliuk, Ori Kam,
	Matan Azrad, Shahaf Shuler, Slava Ovsiienko, Ferruh Yigit,
	Andrew Rybchenko

> 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.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
>  lib/librte_ethdev/rte_flow.h    | 3 +--
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 62d9ca9ffb..51cc41face 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -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
> --- a/lib/librte_ethdev/rte_flow.h
> +++ b/lib/librte_ethdev/rte_flow.h
> @@ -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
> --
> 2.28.0

Reviewed-by: Tal Shnaiderman <talshn@nvidia.com>
Tested-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] ethdev: rename a flow shared action error code
  2020-11-20 10:54 ` Tal Shnaiderman
@ 2020-11-20 13:10   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2020-11-20 13:10 UTC (permalink / raw)
  To: Tal Shnaiderman, NBU-Contact-Thomas Monjalon, dev
  Cc: david.marchand, Andrey Vesnovaty, dmitry.kozliuk, Ori Kam,
	Matan Azrad, Shahaf Shuler, Slava Ovsiienko, Andrew Rybchenko

On 11/20/2020 10:54 AM, Tal Shnaiderman wrote:
>> 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.
>>
>> 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>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20  9:54 [dpdk-dev] [PATCH 1/1] ethdev: rename a flow shared action error code Thomas Monjalon
2020-11-20 10:54 ` Tal Shnaiderman
2020-11-20 13:10   ` Ferruh Yigit

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox