[dpdk-dev] [PATCH] net/mlx5: fix shared RSS action update

Tal Shnaiderman talshn at nvidia.com
Mon Nov 23 21:15:15 CET 2020


> Subject: [dpdk-dev] [PATCH] net/mlx5: fix shared RSS action update
> 
> The shared RSS action update was not operational due to lack of kernel driver
> support of TIR object modification.
> This commit introduces the workaround to support shared RSS action modify
> using an indirect queue table update instead of touching TIR object directly.
> Limitations: the only supported RSS property to update is queues, the rest of
> the properties ignored.
> 
> Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")
> 
> Signed-off-by: Andrey Vesnovaty <andreyv at nvidia.com>
> ---
>  drivers/net/mlx5/mlx5.h         |   8 +-
>  drivers/net/mlx5/mlx5_devx.c    |  84 +++++++++++++++--
>  drivers/net/mlx5/mlx5_flow.h    |   4 +-
>  drivers/net/mlx5/mlx5_flow_dv.c | 103 ++++++++++++---------
>  drivers/net/mlx5/mlx5_rxq.c     | 159 +++++++++++++++++++++++++++-----
>  drivers/net/mlx5/mlx5_rxtx.h    |   6 ++
>  6 files changed, 283 insertions(+), 81 deletions(-)
> 

<snip>

> +11528,14 @@ __flow_dv_action_rss_release(struct rte_eth_dev *dev,
> uint32_t idx,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
>  					  NULL,
>  					  "shared rss hrxq has references");
> +	queue = shared_rss->ind_tbl->queues;
> +	remaining = mlx5_ind_table_obj_release(dev, shared_rss->ind_tbl,
> true);
> +	if (remaining)
> +		return rte_flow_error_set(error, ETOOMANYREFS,
> +					  RTE_FLOW_ERROR_TYPE_ACTION,
> +					  NULL,
> +					  "shared rss indirection table has"
> +					  " references");

Please do not use ETOOMANYREFS, the API errno was changed to EBUSY.

>  	if (!__atomic_compare_exchange_n(&shared_rss->refcnt,
> &old_refcnt,
>  					 0, 0, __ATOMIC_ACQUIRE,
>  					 __ATOMIC_RELAXED))


</snip>

> --
> 2.26.2



More information about the dev mailing list