]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: restore tm priority/qset to default settings when tc disabled
authorGuangbin Huang <huangguangbin2@huawei.com>
Sat, 11 Jun 2022 12:25:27 +0000 (20:25 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jun 2022 10:56:01 +0000 (11:56 +0100)
commit5a5ac918e1421d09b6fc88ed7d394cbf22d56f93
tree258b49d4bd3d84919eeef99ce8dd015731490132
parent3d5a6c2684b2458420453c886f8d9a300a791c62
net: hns3: restore tm priority/qset to default settings when tc disabled

Currently, settings parameters of schedule mode, dwrr, shaper of tm
priority or qset of one tc are only be set when tc is enabled, they are
not restored to the default settings when tc is disabled. It confuses
users when they cat tm_priority or tm_qset files of debugfs. So this
patch fixes it.

Fixes: c701070a20f5 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c