net: hns3: fix wrong bw weight of disabled tc issue
mainline inclusion from mainline-v6.5-rc2 commit 882481b1c55fc44861d7e2d54b4e0936b1b39f2c 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=882481b1c55fc44861d7e2d54b4e0936b1b39f2c ---------------------------------------------------------------------- In dwrr mode, the default bandwidth weight of disabled tc is set to 0. If the bandwidth weight is 0, the mode will change to sp. Therefore, disabled tc default bandwidth weight need changed to 1, and 0 is returned when query the bandwidth weight of disabled tc. In addition, driver need stop configure bandwidth weight if tc is disabled. Fixes: 84844054 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver") Signed-off-by: NJie Wang <wangjie125@huawei.com> 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>
Showing
想要评论请 注册 或 登录