[PATCH V2 net-next 3/9] net: hns3: replace num_req_vfs with num_alloc_vport in hclge_reset_umv_space()
From: Huazhong Tan
Date: Sat Apr 25 2020 - 22:15:47 EST
From: Jian Shen <shenjian15@xxxxxxxxxx>
Like the calculation elsewhere, replaces num_req_vfs with
num_alloc_vport in hclge_reset_umv_space().
Signed-off-by: Jian Shen <shenjian15@xxxxxxxxxx>
Signed-off-by: Huazhong Tan <tanhuazhong@xxxxxxxxxx>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index fe6e60a..a268004 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -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);
}
--
2.7.4