]> 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)
commitb39d001ca2752b767758a1008c14a6b62a9dc1b6
tree258b49d4bd3d84919eeef99ce8dd015731490132
parentb83e8bf38817c3d334fb14de222895701a8752d3
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: 4561179872dd ("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