All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dev@dpdk.org>
Cc: <xavier.huwei@huawei.com>
Subject: [dpdk-dev] [PATCH v3 4/4] net/hns3: fix RSS configuration when empty RSS type
Date: Tue, 14 Jul 2020 14:16:09 +0800	[thread overview]
Message-ID: <1594707369-36270-5-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1594707369-36270-1-git-send-email-xavier.huwei@huawei.com>

From: Lijun Ou <oulijun@huawei.com>

According to the definition of RSS types of action attributes from
testpmd, the driver will not disable RSS but instead requests the
unspecified "best-effort" settings when upper application call
rte_flow_create API function to create flow using empty RSS types.

As a result, here use the default RSS types when RSS types is empty.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 1e58ad7..7ec46ae 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1486,7 +1486,9 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 	}
 
 	/* Filter the unsupported flow types */
-	flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT;
+	flow_types = conf->conf.types ?
+		     rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :
+		     hw->rss_info.conf.types;
 	if (flow_types != rss_flow_conf.types)
 		hns3_warn(hw, "modified RSS types based on hardware support, "
 			      "requested:%" PRIx64 " configured:%" PRIx64,
@@ -1494,9 +1496,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
 
-	if ((rss_flow_conf.types & ETH_RSS_PROTO_MASK) == 0)
-		return hns3_disable_rss(hw);
-
 	rss_info = &hw->rss_info;
 	if (!add) {
 		if (hns3_action_rss_same(&rss_info->conf, &rss_flow_conf)) {
-- 
2.7.4


  parent reply	other threads:[~2020-07-14  6:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11 10:18 [dpdk-dev] [PATCH v2 0/4] updates for hns3 PMD driver Wei Hu (Xavier)
2020-07-11 10:18 ` [dpdk-dev] [PATCH v2 1/4] net/hns3: support copper media type Wei Hu (Xavier)
2020-07-14  6:16   ` [dpdk-dev] [PATCH v3 0/4] updates for hns3 PMD driver Wei Hu (Xavier)
2020-07-14  6:16     ` [dpdk-dev] [PATCH v3 1/4] net/hns3: support copper media type Wei Hu (Xavier)
2020-07-14  6:16     ` [dpdk-dev] [PATCH v3 2/4] net/hns3: support 200G speed rate Wei Hu (Xavier)
2020-07-14  6:16     ` [dpdk-dev] [PATCH v3 3/4] net/hns3: support keeping CRC Wei Hu (Xavier)
2020-07-14  6:16     ` Wei Hu (Xavier) [this message]
2020-07-14 11:07     ` [dpdk-dev] [PATCH v3 0/4] updates for hns3 PMD driver Ferruh Yigit
2020-07-11 10:18 ` [dpdk-dev] [PATCH v2 2/4] net/hns3: support 200G speed rate Wei Hu (Xavier)
2020-07-11 10:18 ` [dpdk-dev] [PATCH v2 3/4] net/hns3: support keeping CRC Wei Hu (Xavier)
2020-07-11 10:18 ` [dpdk-dev] [PATCH v2 4/4] net/hns3: fix RSS configuration when empty RSS type Wei Hu (Xavier)

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=1594707369-36270-5-git-send-email-xavier.huwei@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.