]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Mar 2020 15:45:13 +0000 (16:45 +0100)
commit7f82ac8267b30485ae87d3078a0f561615d40d28
tree49aff01ac342bdda29b288e390e245f7171378ae
parent89cf961f0ddb7dad58ed9a194aebdb19200b01eb
net: hns3: fix VF bandwidth does not take effect in some case

[ Upstream commit 19eb1123b4e9337fe20b1763fec528f837ec6568 ]

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: ee9e44248f52 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c