代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 2e78798fe932e9064677c6f2d1ea14542c503202 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 21 Oct 2022 15:36:21 +0800
Subject: [PATCH 145/189] net/hns3: fix RSS filter restore
Currently, driver sets RSS function to 'RTE_ETH_HASH_FUNCTION_MAX'
when user flush all rules in order to judge whether driver needs
to restore RSS rules. In fact, all rules are saved in flow RSS list.
So there is no need to modify RSS function to this macro. And this
list can be used to restore. The modification of RSS function may
introduce new problem.
Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush")
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 | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 8b9bfe4880..82ead96854 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1587,8 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
rss_info->conf.queue_num = 0;
}
- /* set RSS func invalid after flushed */
- rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;
return 0;
}
@@ -1659,13 +1657,23 @@ int
hns3_restore_rss_filter(struct rte_eth_dev *dev)
{
struct hns3_adapter *hns = dev->data->dev_private;
+ struct hns3_rss_conf_ele *filter;
struct hns3_hw *hw = &hns->hw;
+ int ret = 0;
- /* When user flush all rules, it doesn't need to restore RSS rule */
- if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX)
- return 0;
+ TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) {
+ if (!filter->filter_info.valid)
+ continue;
- return hns3_config_rss_filter(dev, &hw->rss_info, true);
+ ret = hns3_config_rss_filter(dev, &filter->filter_info, true);
+ if (ret != 0) {
+ hns3_err(hw, "restore RSS filter failed, ret=%d", ret);
+ goto out;
+ }
+ }
+
+out:
+ return ret;
}
static int
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。