1 Star 0 Fork 75

温志伟/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0040-net-hns3-fix-double-decrement-of-secondary-count.patch 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
speech_white 提交于 2022-02-09 14:47 . sync patches from upstreaming branch
From eb0bbc8fbec6bb10dfcfdca470dc413038e8608c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 28 Jan 2022 10:07:06 +0800
Subject: [PATCH] net/hns3: fix double decrement of secondary count
The "secondary_cnt" indicates the number of secondary processes on an
Ethernet device. But the variable is double subtracted when detach the
device in secondary processes.
Fixes: ff6dc76e40b8 ("net/hns3: refactor multi-process initialization")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 1af2e07e81..dab1130dad 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2399,7 +2399,6 @@ hns3vf_dev_uninit(struct rte_eth_dev *eth_dev)
PMD_INIT_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
- __atomic_fetch_sub(&hw->secondary_cnt, 1, __ATOMIC_RELAXED);
hns3_mp_uninit(eth_dev);
return 0;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wenzhiwei11/dpdk.git
git@gitee.com:wenzhiwei11/dpdk.git
wenzhiwei11
dpdk
dpdk
master

搜索帮助