1 Star 0 Fork 75

sky/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0228-net-hns3-fix-warning-on-flush-or-destroy-rule.patch 2.20 KB
一键复制 编辑 原始数据 按行查看 历史
From 21b43c2f2d66de594ed174a0ba18da03a6fe5296 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 31 Jan 2023 21:02:58 +0800
Subject: net/hns3: fix warning on flush or destroy rule
[ upstream commit a7bf2789168c8d49ca4dec5bb7bb0b3f765fc1bd ]
Although flow rules will no longer be used when user flush all rules
or destroy a rule a warning is generated like:
"modified RSS types based on hardware support, requested:0x137f83fffc
configured:0x3ffc".
Prevent warning for flush or destroy rule case.
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(-)
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.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nlgwcy/dpdk.git
git@gitee.com:nlgwcy/dpdk.git
nlgwcy
dpdk
dpdk
master

搜索帮助