From nobody Wed Oct 8 05:47:02 2025 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57E3D27A448; Wed, 2 Jul 2025 13:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751461462; cv=none; b=paNTTEUDaTI24AVgqBKh3UlEa0f4D1xtyTOsAPEJKk72G1YwSDh/urNdtfdrzYjtbWAqk6VW/Rc0y5xBeqyy0YkHktJbvLkfidQWzMPmXzN3qAWnRKCnOgpy1GBwSH/DD8ui71fjsW2AzJeCifdqd1210eozXpmmrrp3aescZbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751461462; c=relaxed/simple; bh=sXe8pbpdMBnDz+A8Kv5f6Z62KfbqJTHfpNLinpuChFU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZqezEXe/SwhqV0C20S2c/RcD1HSUMsEFUmv4wlv6HL1MSHFQevzqJZo8UlCnSfece8KckGbL5jmnaP3390mv/eQ4MmDjjGEwCY3ahm9PFZmKDXUBLqS2nFwgbl6DIIfYXr2JKipogZDtXuEpPRRYQvhgEgfXoy3kf6ar2z/K9dY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.190 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4bXKn36Bcrz2TS0g; Wed, 2 Jul 2025 21:02:31 +0800 (CST) Received: from kwepemk100013.china.huawei.com (unknown [7.202.194.61]) by mail.maildlp.com (Postfix) with ESMTPS id 5650B1A0188; Wed, 2 Jul 2025 21:04:18 +0800 (CST) Received: from localhost.localdomain (10.90.31.46) by kwepemk100013.china.huawei.com (7.202.194.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 2 Jul 2025 21:04:17 +0800 From: Jijie Shao To: , , , , , CC: , , , , , , , , Subject: [PATCH net-next 3/4] net: hns3: fixed vf get max channels bug Date: Wed, 2 Jul 2025 20:57:30 +0800 Message-ID: <20250702125731.2875331-4-shaojijie@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20250702125731.2875331-1-shaojijie@huawei.com> References: <20250702125731.2875331-1-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemk100013.china.huawei.com (7.202.194.61) Content-Type: text/plain; charset="utf-8" From: Hao Lan Currently, the queried maximum of vf channels is the maximum of channels supported by each TC. However, the actual maximum of channels is the maximum of channels supported by the device. Fixes: 849e46077689 ("net: hns3: add ethtool_ops.get_channels support for V= F") Signed-off-by: Jian Shen Signed-off-by: Hao Lan Signed-off-by: Peiyang Wang Signed-off-by: Jijie Shao --- drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/dr= ivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 33136a1e02cf..626f5419fd7d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -3094,11 +3094,7 @@ static void hclgevf_uninit_ae_dev(struct hnae3_ae_de= v *ae_dev) =20 static u32 hclgevf_get_max_channels(struct hclgevf_dev *hdev) { - struct hnae3_handle *nic =3D &hdev->nic; - struct hnae3_knic_private_info *kinfo =3D &nic->kinfo; - - return min_t(u32, hdev->rss_size_max, - hdev->num_tqps / kinfo->tc_info.num_tc); + return min_t(u32, hdev->rss_size_max, hdev->num_tqps); } =20 /** --=20 2.33.0