linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<linuxarm@huawei.com>, <kuba@kernel.org>,
	Jian Shen <shenjian15@huawei.com>,
	Huazhong Tan <tanhuazhong@huawei.com>
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	[thread overview]
Message-ID: <1587694993-25183-4-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1587694993-25183-1-git-send-email-tanhuazhong@huawei.com>

From: Jian Shen <shenjian15@huawei.com>

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>
---
 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


  parent reply	other threads:[~2020-04-24  2:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24  2:23 [PATCH net-next 0/8] net: hns3: refactor for MAC table Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 1/8] net: hns3: refine for unicast MAC VLAN space management Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 2/8] net: hns3: remove unnecessary parameter 'is_alloc' in hclge_set_umv_space() Huazhong Tan
2020-04-24  2:23 ` Huazhong Tan [this message]
2020-04-24  2:23 ` [PATCH net-next 4/8] net: hns3: refactor the MAC address configure Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 5/8] net: hns3: add support for dumping UC and MC MAC list Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 6/8] net: hns3: refactor the promisc mode setting Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 7/8] net: hns3: use mutex vport_lock instead of mutex umv_lock Huazhong Tan
2020-04-24  2:23 ` [PATCH net-next 8/8] net: hns3: optimize the filter table entries handling when resetting Huazhong Tan
2020-04-24 23:23 ` [PATCH net-next 0/8] net: hns3: refactor for MAC table Jakub Kicinski
2020-04-26  1:28   ` tanhuazhong
2020-04-26  3:29 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1587694993-25183-4-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=shenjian15@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).