Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp105620ybz; Thu, 23 Apr 2020 19:29:53 -0700 (PDT) X-Google-Smtp-Source: APiQypKiLVAWjtBL0qgYwvkergIa2b2Edx+XD8kTNGdpvabnqn7NdaZzjZAu1YpUbQuMl8ddRIp9 X-Received: by 2002:a17:906:6b05:: with SMTP id q5mr5057549ejr.329.1587695392911; Thu, 23 Apr 2020 19:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587695392; cv=none; d=google.com; s=arc-20160816; b=WNcixBTJogtOGxC/l3XUH4z7GPem6HKL8aHTVj6vhdSrjsaQPkxZAoAK1m7jEt6CVh NYuRBJfSCQkk10HAUN80DUEW4LTTXvSh8+XFgAmzza1Z5LPSWbMNCRHtAaoXoum0VV/R daKZ832kIRLymUqG4aRkr4UnG+WC0gwvhGMr3fiG4ObHB1kbzbcqccyBKHT0cb58kVZ4 7k0asi/2wU3AAivuphrF3HNNOEJrvlXEhcEBgVZYpSQTW/+7w7Xhub/C+UHZ5fbj8bqx QJmM9RpyBsz4cyCo1bjQnmDzlWhNNQgPg/+Qcu7bg5w9eUDzk31N2GlAMD0YAvfVWfb2 FakA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=UUOq4SA5rZX2BII8wKt9Lt3g8l5+v+viLq6iCsJtp9U=; b=g7Wr0tBRVjfzgMVUoZEReGB/q6tZV7QhOUghonXnfFXREJgBzlhF+CEJDijnNmPvCL V0SP73URcrt2lFskVpJ6pbZYK5OAZ72y4aNfnVEqGJjs0o6+5WPsGxcpj18XpbI78O+B Wqrjq+a95U5rcQsEWI77NGHHVL4zwnEqd3MdjXYlrX3v8iUBN3/xcuUcMYoHAhgAk9C6 /ZfHvTvUdsX85GdXOfb1HUutSZUnVGL11BsD3EJVGIDFfWfXIB2GmRZoYd9rEZTIaETY K+zwX9bB6oi+CUsMMq8TvRCEwIkp2iDYxuIgPrDwurC8oqVUusEAmVBiNRx6XITSES7E 3JMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh10si2161377ejb.49.2020.04.23.19.29.29; Thu, 23 Apr 2020 19:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbgDXCZF (ORCPT + 99 others); Thu, 23 Apr 2020 22:25:05 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2886 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726162AbgDXCY2 (ORCPT ); Thu, 23 Apr 2020 22:24:28 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A6A379E67C8B4A24D602; Fri, 24 Apr 2020 10:24:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 24 Apr 2020 10:24:16 +0800 From: Huazhong Tan To: CC: , , , , , , Jian Shen , Huazhong Tan Subject: [PATCH net-next 3/8] net: hns3: replace num_req_vfs with num_alloc_vport in hclge_reset_umv_space() Date: Fri, 24 Apr 2020 10:23:08 +0800 Message-ID: <1587694993-25183-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587694993-25183-1-git-send-email-tanhuazhong@huawei.com> References: <1587694993-25183-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen Like the calculation elsewhere, replaces num_req_vfs with num_alloc_vport in hclge_reset_umv_space(). Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- 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