Skip to content

Commit

Permalink
net/mlx5: fix default queue number in RSS flow rule
Browse files Browse the repository at this point in the history
[ upstream commit 4a5a1e6 ]

The selection flags for the RX hash define how the received packets will
be distributed between multiple queues.
When creating a new TIR, the queue_num is set to 1 if none of the selection
flags is set.

Applied the same to the RSS desc before checking if it matches a cached
TIR object to save creating a new object every time.

Fixes: fabf8a3 ("net/mlx5: fix shared RSS action release")

Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  • Loading branch information
liormargalit authored and bluca committed Aug 3, 2021
1 parent 38779aa commit 4ac789f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/mlx5/mlx5_flow_dv.c
Expand Up @@ -8705,6 +8705,8 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
rss_desc->hash_fields = dev_flow->hash_fields;
rss_desc->tunnel = !!(dh->layers & MLX5_FLOW_LAYER_TUNNEL);
rss_desc->shared_rss = 0;
if (rss_desc->hash_fields == 0)
rss_desc->queue_num = 1;
*hrxq_idx = mlx5_hrxq_get(dev, rss_desc);
if (!*hrxq_idx)
return NULL;
Expand Down

0 comments on commit 4ac789f

Please sign in to comment.