提交 635623b4 编写于 作者: J Jijie Shao 提交者: Jiantao Xiao

net: hns3: fix wrong tc bandwidth weight data issue

mainline inclusion
from mainline-v6.5-rc2
commit 116d9f732eef634abbd871f2c6f613a5b4677742
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7OL9R
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=116d9f732eef634abbd871f2c6f613a5b4677742

----------------------------------------------------------------------

Currently, the weight saved by the driver is used as the query result,
which may be different from the actual weight in the register.
Therefore, the register value read from the firmware is used
as the query result

Fixes: 0e32038d ("net: hns3: refactor dump tc of debugfs")
Signed-off-by: NJijie Shao <shaojijie@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NJiantao Xiao <xiaojiantao1@h-partners.com>
上级 1b4b5ee0
......@@ -708,8 +708,7 @@ static int hclge_dbg_dump_tc(struct hclge_dev *hdev, char *buf, int len)
for (i = 0; i < HNAE3_MAX_TC; i++) {
sch_mode_str = ets_weight->tc_weight[i] ? "dwrr" : "sp";
pos += scnprintf(buf + pos, len - pos, "%u %4s %3u\n",
i, sch_mode_str,
hdev->tm_info.pg_info[0].tc_dwrr[i]);
i, sch_mode_str, ets_weight->tc_weight[i]);
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册