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: ee9e44248f52 ("net: hns3: add support for configuring bandwidth of VF on the host")
Signed-off-by: Yonglong Liu <>
Signed-off-by: Huazhong Tan <>
Signed-off-by: David S. Miller <>
1 file changed