]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns3: replace num_req_vfs with num_alloc_vport in hclge_reset_umv_space()
authorJian Shen <shenjian15@huawei.com>
Fri, 24 Apr 2020 02:23:08 +0000 (10:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 Apr 2020 03:29:44 +0000 (20:29 -0700)
Like the calculation elsewhere, replaces num_req_vfs with
num_alloc_vport in hclge_reset_umv_space().

Signed-off-by: Jian Shen <shenjian15@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_main.c

index fe6e60a41925b5840167a0b5efcea6138d851454..a268004c8e0e2125856e90fd22ff4003300c008a 100644 (file)
@@ -7254,7 +7254,7 @@ static void hclge_reset_umv_space(struct hclge_dev *hdev)
 
        mutex_lock(&hdev->umv_mutex);
        hdev->share_umv_size = hdev->priv_umv_size +
-                       hdev->max_umv_size % (hdev->num_req_vfs + 2);
+                       hdev->max_umv_size % (hdev->num_alloc_vport + 1);
        mutex_unlock(&hdev->umv_mutex);
 }