1 Star 0 Fork 76

wzc_1024/dpdk_src_openEuler

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0097-ethdev-fix-port-state-when-stop.patch 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
liudongdong3 提交于 2022-06-16 16:03 . sync patches from 22.07
From df393a512efe98bffa9b872844ea999507e51fba Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <[email protected]>
Date: Tue, 3 May 2022 18:02:17 +0800
Subject: [PATCH 097/122] ethdev: fix port state when stop
Currently, 'dev_started' is always set to be 0 when dev stop, whether
it succeeded or failed. This is unreasonable and this patch fixed it.
Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")
Signed-off-by: Min Hu (Connor) <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
Acked-by: Ferruh Yigit <[email protected]>
---
lib/ethdev/rte_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e55d11937e..2671f47738 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -1879,8 +1879,9 @@ rte_eth_dev_stop(uint16_t port_id)
/* point fast-path functions to dummy ones */
eth_dev_fp_ops_reset(rte_eth_fp_ops + port_id);
- dev->data->dev_started = 0;
ret = (*dev->dev_ops->dev_stop)(dev);
+ if (ret == 0)
+ dev->data->dev_started = 0;
rte_ethdev_trace_stop(port_id, ret);
return ret;
--
2.22.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wzc_1024/dpdk_openEuler.git
[email protected]:wzc_1024/dpdk_openEuler.git
wzc_1024
dpdk_openEuler
dpdk_src_openEuler
master

搜索帮助