Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1433918ybz; Sat, 25 Apr 2020 19:19:04 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3PvbwsrN6e2jIQbEAtc9nhc8KpVI/wiOg5cWTqv2RMDSmJHtbiu26xO3IB2u9V1beRtMn X-Received: by 2002:a05:6402:6d5:: with SMTP id n21mr14014720edy.82.1587867543900; Sat, 25 Apr 2020 19:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587867543; cv=none; d=google.com; s=arc-20160816; b=zkAL699PNU80iqDIilMJIJzn5MQ0gH7aA+jWrjtAkyjulbPZE6vLPAhQkfInRoHnxD tCJKvz85vL5SmF57KVlHJftK6//CISbBSG88QJQcp64LXyOkf2zwxcoQcYdk3mcyewIF X9npYJtK0xRicPyG9ntoSUhhgAQWz+f81zZQwjkhL8KDfrbYPzKQ5DvQSbnvWz1af6Re eNwKragzWBGIiozc6G4BhGdhAOnBlrakPcKvS3BMzfoFsL50ulit7D1/d3ov+AAFeTvP nUkxy2fIDIUhSvSNQtvwQ4sLM5vrDcq7f5ZcBI4r81YiNeNV0gx1tqYuxKwJ+R0h1ELP Js2Q== 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=JykJvo/KfL3mBZwjumtb/tK64FKQ0esEt3+FZDojdJ5/tnHvzd7Zqs+jPIsqxu/u/m kYCH/CIDnZ7fehbPUYeiEzWxavRtOKEnD+kxiZp/9LCf7ao0CV37RFYziDD/KQALvD4b Bb6FetlJpJx3E35R/USxrghZToPFP+zIIttLa9QP53sVOx91gw/oEMULo5HXDsJ/7d5u tgPTjKK9vobIhlrkfDMR3iqqmlyc61HqHZZ91aTpBfrqnzA5GrbDwa/fSEKD3GjRLSFg r1xp6mRmzY1fNwsdv8WJYis0Ixo+j7+Sh+nNR8pcXau92G7UDW1ugsWgTlElBNlssSKm HBQA== 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 y71si6167891ede.301.2020.04.25.19.18.40; Sat, 25 Apr 2020 19:19:03 -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 S1726154AbgDZCPK (ORCPT + 99 others); Sat, 25 Apr 2020 22:15:10 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2899 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726090AbgDZCPK (ORCPT ); Sat, 25 Apr 2020 22:15:10 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0C3A84DEB3B4422145E9; Sun, 26 Apr 2020 10:15:07 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Sun, 26 Apr 2020 10:15:00 +0800 From: Huazhong Tan To: CC: , , , , , , Jian Shen , Huazhong Tan Subject: [PATCH V2 net-next 3/9] net: hns3: replace num_req_vfs with num_alloc_vport in hclge_reset_umv_space() Date: Sun, 26 Apr 2020 10:13:42 +0800 Message-ID: <1587867228-9955-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587867228-9955-1-git-send-email-tanhuazhong@huawei.com> References: <1587867228-9955-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