1 Star 0 Fork 75

mds.lanruo/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0307-net-hns3-fix-uninitialized-variable.patch 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
chenjiji09 提交于 2023-06-05 14:20 . net/hns3: fix Rx ring mbuf leakage
From 8bd047fb37fbc06fd695f120d9d51a4ffbcc2493 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Fri, 2 Jun 2023 19:42:02 +0800
Subject: net/hns3: fix uninitialized variable
[ upstream commit 82d44a304e9a0fe5931b7c68d32c3e30477564f2 ]
This patch fixes possible use of uninitialized variable
"old_tuple_fields".
Fixes: e3069658da9f ("net/hns3: reimplement hash flow function")
Cc: stable@dpdk.org
Signed-off-by: Jie Hai <haijie1@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index c1f4f5cb0b..d5c9c22633 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1944,8 +1944,9 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw,
if (ret != 0)
return ret;
- hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
- old_tuple_fields, new_tuple_fields);
+ if (!cfg_global_tuple)
+ hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64,
+ old_tuple_fields, new_tuple_fields);
return 0;
}
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mdslanruo/dpdk.git
git@gitee.com:mdslanruo/dpdk.git
mdslanruo
dpdk
dpdk
master

搜索帮助