DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lior Margalit <lmargalit@nvidia.com>
To: Matan Azrad <matan@nvidia.com>
Cc: Lior Margalit <lmargalit@nvidia.com>, <dev@dpdk.org>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix queue num in RSS desc
Date: Tue, 27 Jul 2021 09:46:20 +0300	[thread overview]
Message-ID: <20210727064620.880417-3-lmargalit@nvidia.com> (raw)
In-Reply-To: <20210727064620.880417-1-lmargalit@nvidia.com>

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 non 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: fabf8a37241c ("net/mlx5: fix shared RSS action release")
Cc: stable@dpdk.org

Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index fe922b6fbe..4aac69028f 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10985,6 +10985,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;
-- 
2.25.1


  parent reply	other threads:[~2021-07-27  6:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 12:54 [dpdk-dev] [PATCH v1] net/mlx5: fix RSS selection flags settings Lior Margalit
2021-07-15  8:28 ` Raslan Darawsheh
2021-07-27  6:46 ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: prevent RSS distribution by L4 proto alone Lior Margalit
2021-07-27  6:46   ` [dpdk-dev] [PATCH v2 1/2] net/mlx5: fix RSS L4 proto selection flags settings Lior Margalit
2021-07-27  6:46   ` Lior Margalit [this message]
2021-07-28 13:08   ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: prevent RSS distribution by L4 proto alone Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727064620.880417-3-lmargalit@nvidia.com \
    --to=lmargalit@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).