DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jiawei Wang <jiaweiw@nvidia.com>
To: ferruh.yigit@intel.com, viacheslavo@nvidia.com, matan@nvidia.com,
	orika@nvidia.com
Cc: dev@dpdk.org, rasland@nvidia.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v3 2/4] net/mlx5: fix the unnecessary checking for RSS action
Date: Thu, 14 Jan 2021 09:24:46 +0200
Message-ID: <1610609088-204833-3-git-send-email-jiaweiw@nvidia.com> (raw)
In-Reply-To: <1610609088-204833-1-git-send-email-jiaweiw@nvidia.com>

RSS action is valid only in NIC-RX domain, this fix bypass
the function that getting RSS action from the flow action list
under no NIC-RX domain.

Fixes: e745f90 ("net/mlx5: optimize flow RSS struct")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2a4073c..0670447 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5278,7 +5278,7 @@ struct mlx5_hlist_entry *
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct rte_flow *flow = NULL;
 	struct mlx5_flow *dev_flow;
-	const struct rte_flow_action_rss *rss;
+	const struct rte_flow_action_rss *rss = NULL;
 	struct mlx5_translated_shared_action
 		shared_actions[MLX5_MAX_SHARED_ACTIONS];
 	int shared_actions_n = MLX5_MAX_SHARED_ACTIONS;
@@ -5356,7 +5356,9 @@ struct mlx5_hlist_entry *
 	MLX5_ASSERT(flow->drv_type > MLX5_FLOW_TYPE_MIN &&
 		    flow->drv_type < MLX5_FLOW_TYPE_MAX);
 	memset(rss_desc, 0, offsetof(struct mlx5_flow_rss_desc, queue));
-	rss = flow_get_rss_action(p_actions_rx);
+	/* RSS Action only works on NIC RX domain */
+	if (attr->ingress && !attr->transfer)
+		rss = flow_get_rss_action(p_actions_rx);
 	if (rss) {
 		if (flow_rss_workspace_adjust(wks, rss_desc, rss->queue_num))
 			return 0;
-- 
1.8.3.1


  parent reply	other threads:[~2021-01-14  7:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10  9:10 [dpdk-dev] [PATCH 0/3] Add RSS action support in the sample sub-actions list Jiawei Wang
2021-01-10  9:10 ` [dpdk-dev] [PATCH 1/3] app/testpmd: add RSS support in sample action Jiawei Wang
2021-01-10  9:10 ` [dpdk-dev] [PATCH 2/3] net/mlx5: handle the RSS action in the sample Jiawei Wang
2021-01-10  9:10 ` [dpdk-dev] [PATCH 3/3] doc: update RSS support in sample action Jiawei Wang
2021-01-12 10:01 ` [dpdk-dev] [PATCH v2 0/4] Add RSS action support in the sample sub-actions list Jiawei Wang
2021-01-12 10:01   ` [dpdk-dev] [PATCH v2 1/4] app/testpmd: add RSS support in sample action Jiawei Wang
2021-01-12 10:01   ` [dpdk-dev] [PATCH v2 2/4] net/mlx5: fix the unnecessary checking for RSS action Jiawei Wang
2021-01-12 10:01   ` [dpdk-dev] [PATCH v2 3/4] net/mlx5: handle the RSS action in the sample Jiawei Wang
2021-01-12 10:01   ` [dpdk-dev] [PATCH v2 4/4] doc: update RSS support in sample action Jiawei Wang
2021-01-19 13:13     ` Ferruh Yigit
2021-01-14  7:24   ` [dpdk-dev] [PATCH v3 0/4] Add RSS action support in the sample sub-actions list Jiawei Wang
2021-01-14  7:24     ` [dpdk-dev] [PATCH v3 1/4] app/testpmd: add RSS support in sample action Jiawei Wang
2021-01-14  7:24     ` Jiawei Wang [this message]
2021-01-14  7:24     ` [dpdk-dev] [PATCH v3 3/4] net/mlx5: handle the RSS action in the sample Jiawei Wang
2021-01-14  7:24     ` [dpdk-dev] [PATCH v3 4/4] doc: update RSS support in sample action Jiawei Wang
2021-01-18 20:30     ` [dpdk-dev] [PATCH v3 0/4] Add RSS action support in the sample sub-actions list 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=1610609088-204833-3-git-send-email-jiaweiw@nvidia.com \
    --to=jiaweiw@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


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