DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: <dev@dpdk.org>, <ferruh.yigit@amd.com>, <thomas@monjalon.net>,
	<andrew.rybchenko@oktetlabs.ru>
Cc: <stable@dpdk.org>, <yisen.zhuang@huawei.com>,
	<liudongdong3@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH V2 07/10] net/hns3: remove useless code when destroy valid RSS rule
Date: Mon, 30 Jan 2023 17:31:26 +0800	[thread overview]
Message-ID: <20230130093129.18529-8-liudongdong3@huawei.com> (raw)
In-Reply-To: <20230130093129.18529-1-liudongdong3@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

The hw::rss_info::conf::func was set to the macro RTE_ETH_HASH_FUNCTION_MAX
and hw::rss_info::conf::queue was set to NULL when all rules are flushed,
which indicates no flow rules is issued. See
commit eb158fc756a5 ("net/hns3: fix config when creating RSS rule after
flush").
Actually, the way determining whether there are rules has been changed by
walking the flow RSS list. See
commit 705a50800334 ("net/hns3: fix RSS filter restore").

In addition, the rte_flow_action_rss from user isn't saved to 'conf' in
hw->rss_info now. So this code can be removed.

Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")
Fixes: 705a50800334 ("net/hns3: fix RSS filter restore")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 26 ++------------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 303275ae93..7adde16cbc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1279,19 +1279,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 	bool rss_key_is_same;
 	bool func_is_same;
 
-	/*
-	 * When user flush all RSS rule, RSS func is set invalid with
-	 * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
-	 * flushed, any validate RSS func is different with it before
-	 * flushed. Others, when user create an action RSS with RSS func
-	 * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
-	 * between continuous RSS flow.
-	 */
-	if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
-		func_is_same = false;
-	else
-		func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
-				(comp->func == with->func) : true;
+	func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ?
+			(comp->func == with->func) : true;
 
 	if (with->key_len == 0 || with->key == NULL)
 		rss_key_is_same = 1;
@@ -1533,7 +1522,6 @@ static int
 hns3_config_rss_filter(struct hns3_hw *hw,
 		       const struct hns3_rss_conf *conf, bool add)
 {
-	struct hns3_rss_conf *rss_info;
 	uint64_t flow_types;
 	uint16_t num;
 	int ret;
@@ -1560,7 +1548,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
 
-	rss_info = &hw->rss_info;
 	if (!add) {
 		if (!conf->valid)
 			return 0;
@@ -1571,15 +1558,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,
 			return ret;
 		}
 
-		if (rss_flow_conf.queue_num) {
-			/*
-			 * Due the content of queue pointer have been reset to
-			 * 0, the rss_info->conf.queue should be set to NULL
-			 */
-			rss_info->conf.queue = NULL;
-			rss_info->conf.queue_num = 0;
-		}
-
 		return 0;
 	}
 
-- 
2.22.0


  parent reply	other threads:[~2023-01-30  9:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 10:51 [PATCH 00/10] net/hns3: some bugfixes for rss Dongdong Liu
2023-01-29 10:51 ` [PATCH 01/10] net/hns3: fix error log about indirection table size Dongdong Liu
2023-01-29 10:51 ` [PATCH 02/10] net/hns3: extract common API to query device Dongdong Liu
2023-01-29 10:51 ` [PATCH 03/10] net/hns3: refactor set RSS hash algorithm and key interface Dongdong Liu
2023-01-29 10:51 ` [PATCH 04/10] net/hns3: fix fixed RSS key size to be more compatibility Dongdong Liu
2023-01-29 10:51 ` [PATCH 05/10] net/hns3: fix misclearing RSS configuration Dongdong Liu
2023-01-29 10:51 ` [PATCH 06/10] net/hns3: using RSS filter list to check duplicated rule Dongdong Liu
2023-01-29 10:51 ` [PATCH 07/10] net/hns3: remove useless code when destroy valid RSS rule Dongdong Liu
2023-01-29 10:51 ` [PATCH 08/10] net/hns3: fix useless warning when flush or destroy rule Dongdong Liu
2023-01-29 10:51 ` [PATCH 09/10] net/hns3: fix bad memory structure conversion Dongdong Liu
2023-01-29 10:51 ` [PATCH 10/10] net/hns3: fix incorrect check for duplicate RSS rule Dongdong Liu
2023-01-30  9:31 ` [PATCH V2 00/10] net/hns3: some bugfixes for rss Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 01/10] net/hns3: fix error log about indirection table size Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 02/10] net/hns3: extract common API to query device Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 03/10] net/hns3: refactor set RSS hash algorithm and key interface Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 04/10] net/hns3: fix fixed RSS key size to be more compatibility Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 05/10] net/hns3: fix misclearing RSS configuration Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 06/10] net/hns3: using RSS filter list to check duplicated rule Dongdong Liu
2023-01-30  9:31   ` Dongdong Liu [this message]
2023-01-30  9:31   ` [PATCH V2 08/10] net/hns3: fix useless warning when flush or destroy rule Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 09/10] net/hns3: fix bad memory structure conversion Dongdong Liu
2023-01-31  9:34     ` Dongdong Liu
2023-01-30  9:31   ` [PATCH V2 10/10] net/hns3: fix incorrect check for duplicate RSS rule Dongdong Liu
2023-01-31 13:02 ` [PATCH V3 00/10] net/hns3: some bugfixes for rss Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 01/10] net/hns3: fix error log about indirection table size Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 02/10] net/hns3: extract common API to query device Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 03/10] net/hns3: refactor set RSS hash algorithm and key interface Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 04/10] net/hns3: fix fixed RSS key size to be more compatibility Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 05/10] net/hns3: fix misclearing RSS configuration Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 06/10] net/hns3: using RSS filter list to check duplicated rule Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 07/10] net/hns3: remove useless code when destroy valid RSS rule Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 08/10] net/hns3: fix useless warning when flush or destroy rule Dongdong Liu
2023-01-31 13:02   ` [PATCH V3 09/10] net/hns3: fix bad memory structure conversion Dongdong Liu
2023-01-31 13:03   ` [PATCH V3 10/10] net/hns3: fix incorrect check for duplicate RSS rule Dongdong Liu
2023-02-08 17:46   ` [PATCH V3 00/10] net/hns3: some bugfixes for rss Ferruh Yigit

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=20230130093129.18529-8-liudongdong3@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=lihuisong@huawei.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=yisen.zhuang@huawei.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
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).