From: Huisong Li <lihuis...@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: sta...@dpdk.org

Signed-off-by: Huisong Li <lihuis...@huawei.com>
Signed-off-by: Dongdong Liu <liudongdo...@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

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);
 }
-- 
2.22.0

Reply via email to