代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d982e1518b7fc217dbf14816b0b929079d742137 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 21 Oct 2022 15:36:24 +0800
Subject: [PATCH 148/189] net/hns3: move flow direction rule recovery
The 'hns3_restore_filter' is used to restore flow rules from
rte_flow API during the reset process. This patch moves the
recovery of flow direction rule to this function to improve
code maintainability.
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 4 ----
drivers/net/hns3/hns3_fdir.c | 3 +++
drivers/net/hns3/hns3_flow.c | 7 +++++++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index fc3fc76a40..01c13f8d70 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5907,10 +5907,6 @@ hns3_restore_conf(struct hns3_adapter *hns)
if (ret)
goto err_promisc;
- ret = hns3_restore_all_fdir_filter(hns);
- if (ret)
- goto err_promisc;
-
ret = hns3_restore_ptp(hns);
if (ret)
goto err_promisc;
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 30e5e66772..48a91fb517 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1068,6 +1068,9 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
bool err = false;
int ret;
+ if (hns->is_vf)
+ return 0;
+
/*
* This API is called in the reset recovery process, the parent function
* must hold hw->lock.
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 7bd2f0bf7a..17c4274123 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1675,6 +1675,13 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
int
hns3_restore_filter(struct rte_eth_dev *dev)
{
+ struct hns3_adapter *hns = dev->data->dev_private;
+ int ret;
+
+ ret = hns3_restore_all_fdir_filter(hns);
+ if (ret != 0)
+ return ret;
+
return hns3_restore_rss_filter(dev);
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。