1 Star 0 Fork 75

sky/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0373-net-hns3-remove-reset-log-in-secondary.patch 2.89 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2023-11-20 17:28 . sync some patchs from upstreaming
From 0593fced9d1946d55c95c8dea448217f0867faff Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui@huawei.com>
Date: Fri, 27 Oct 2023 14:09:43 +0800
Subject: [PATCH 373/394] net/hns3: remove reset log in secondary
[ upstream commit 5394df455749f60614a19d791d1d73c26b74dea1 ]
The reset event is checked and done in primary. And the secondary
doesn't check and display reset log. There is a patch to remove the
check code for secondary. please see commit a8f1f7cf1b42 ("net/hns3:
fix crash when secondary process access FW")
This patch removes the redundant log print of reset.
Fixes: a8f1f7cf1b42 ("net/hns3: fix crash when secondary process access FW")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 +++++------
drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++------
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ad595478a7..185f211591 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5512,14 +5512,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns)
enum hns3_reset_level reset;
/*
- * Check the registers to confirm whether there is reset pending.
- * Note: This check may lead to schedule reset task, but only primary
- * process can process the reset event. Therefore, limit the
- * checking under only primary process.
+ * Only primary can process can process the reset event,
+ * so don't check reset event in secondary.
*/
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- hns3_check_event_cause(hns, NULL);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return false;
+ hns3_check_event_cause(hns, NULL);
reset = hns3_get_reset_level(hns, &hw->reset.pending);
if (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET &&
hw->reset.level < reset) {
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 02fb4a84cf..003071c6ff 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1796,14 +1796,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
return false;
/*
- * Check the registers to confirm whether there is reset pending.
- * Note: This check may lead to schedule reset task, but only primary
- * process can process the reset event. Therefore, limit the
- * checking under only primary process.
+ * Only primary can process can process the reset event,
+ * so don't check reset event in secondary.
*/
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- hns3vf_check_event_cause(hns, NULL);
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return false;
+ hns3vf_check_event_cause(hns, NULL);
reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&
hw->reset.level < reset) {
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nlgwcy/dpdk.git
git@gitee.com:nlgwcy/dpdk.git
nlgwcy
dpdk
dpdk
master

搜索帮助