diff options
author | Yonglong Liu <liuyonglong@huawei.com> | 2019-09-11 10:40:35 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-11 09:08:45 +0100 |
commit | 1a92497dc3f90280aebfea8044741d75438110e0 (patch) | |
tree | e1bd702c333d6bf678ee26ba39806c7ed24d78fd /drivers/net/ethernet/wiznet | |
parent | 3a5a5f06d4d2ddb257cb71e9c52106f50abad8fc (diff) |
net: hns3: fix shaper parameter algorithm
Currently when hns3 driver configures the tm shaper to limit
bandwidth below 20Mbit using the parameters calculated by
hclge_shaper_para_calc(), the actual bandwidth limited by tm
hardware module is not accurate enough, for example, 1.28 Mbit
when the user is configuring 1 Mbit.
This patch adjusts the ir_calc to be closer to ir, and
always calculate the ir_b parameter when user is configuring
a small bandwidth. Also, removes an unnecessary parenthesis
when calculating denominator.
Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wiznet')
0 files changed, 0 insertions, 0 deletions