mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 10:00:51 +07:00
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: ee9e44248f
("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>
This commit is contained in:
parent
d0db7ed397
commit
19eb1123b4
@ -566,7 +566,7 @@ static void hclge_tm_vport_tc_info_update(struct hclge_vport *vport)
|
||||
*/
|
||||
kinfo->num_tc = vport->vport_id ? 1 :
|
||||
min_t(u16, vport->alloc_tqps, hdev->tm_info.num_tc);
|
||||
vport->qs_offset = (vport->vport_id ? hdev->tm_info.num_tc : 0) +
|
||||
vport->qs_offset = (vport->vport_id ? HNAE3_MAX_TC : 0) +
|
||||
(vport->vport_id ? (vport->vport_id - 1) : 0);
|
||||
|
||||
max_rss_size = min_t(u16, hdev->rss_size_max,
|
||||
|
Loading…
Reference in New Issue
Block a user