[V2,08/10] net/hns3: fix useless warning when flush or destroy rule

Message ID 20230130093129.18529-9-liudongdong3@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/hns3: some bugfixes for rss |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Dongdong Liu Jan. 30, 2023, 9:31 a.m. UTC
  From: Huisong Li <lihuisong@huawei.com>

The types of the rule will no longer be used when user flush all rules or
destroy a rule. But user would receive some RSS types warnings, like,
"modified RSS types based on hardware support, requested:0x137f83fffc
configured:0x3ffc".

Fixes: ec674cb742e5 ("net/hns3: fix flushing RSS rule")
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 | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
  

Patch

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 7adde16cbc..fbc38dd3d4 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1537,17 +1537,6 @@  hns3_config_rss_filter(struct hns3_hw *hw,
 		.queue = conf->conf.queue,
 	};
 
-	/* Filter the unsupported flow types */
-	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:0x%" PRIx64 " configured:0x%" PRIx64,
-			  rss_flow_conf.types, flow_types);
-	/* Update the useful flow types */
-	rss_flow_conf.types = flow_types;
-
 	if (!add) {
 		if (!conf->valid)
 			return 0;
@@ -1573,6 +1562,17 @@  hns3_config_rss_filter(struct hns3_hw *hw,
 			return ret;
 	}
 
+	/* Filter the unsupported flow types */
+	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:0x%" PRIx64 " configured:0x%" PRIx64,
+			  rss_flow_conf.types, flow_types);
+	/* Update the useful flow types */
+	rss_flow_conf.types = flow_types;
+
 	/* Set hash algorithm and flow types by the user's config */
 	return hns3_hw_rss_hash_set(hw, &rss_flow_conf);
 }