]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix VF bandwidth does not take effect in some case
authorYonglong Liu <liuyonglong@huawei.com>
Fri, 14 Feb 2020 01:53:42 +0000 (09:53 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Feb 2020 15:05:17 +0000 (07:05 -0800)
commitdc5d76d4555063561f8787cc6751111a345ba257
tree24e6f9a9418a5ae553f737c67652b7558ed43420
parentfbb5b5b2d9b4127cfc4e6315b32c6b15755331e6
net: hns3: fix VF bandwidth does not take effect in some case

When enabling 4 TC after setting the bandwidth of VF, the bandwidth
of VF will resume to default value, because of the qset resources
changed in this case.

This patch fixes it by using a fixed VF's qset resources according to
HNAE3_MAX_TC macro.

Fixes: a0b24914180d ("net: hns3: add support for configuring bandwidth of VF on the host")
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>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c