20 Star 0 Fork 76

openEuler-RISC-V/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0070-net-hns3-fix-RSS-TC-mode-entry.patch 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
speech_white 提交于 2022-05-17 19:55 . sync patches for 22.03
From cdb9a7ae5f8f3b59b6de9dc2b52387636245e3a5 Mon Sep 17 00:00:00 2001
From: Huisong Li <[email protected]>
Date: Mon, 28 Feb 2022 11:21:45 +0800
Subject: [PATCH] net/hns3: fix RSS TC mode entry
The driver allocates queues only to valid TCs. But the driver also
configure queues for invalid TCs, which is unreasonable.
Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Signed-off-by: Huisong Li <[email protected]>
Acked-by: Min Hu (Connor) <[email protected]>
---
drivers/net/hns3/hns3_rss.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 1782d63883..ebf3c60f07 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -601,8 +601,8 @@ hns3_set_rss_tc_mode(struct hns3_hw *hw)
for (i = 0; i < HNS3_MAX_TC_NUM; i++) {
tc_valid[i] = !!(hw->hw_tc_map & BIT(i));
- tc_size[i] = roundup_size;
- tc_offset[i] = rss_size * i;
+ tc_size[i] = tc_valid[i] ? roundup_size : 0;
+ tc_offset[i] = tc_valid[i] ? rss_size * i : 0;
}
hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RSS_TC_MODE, false);
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/dpdk.git
[email protected]:openeuler-risc-v/dpdk.git
openeuler-risc-v
dpdk
dpdk
master

搜索帮助