Commit 3c914c6a authored by Hao Lan's avatar Hao Lan Committed by Hao Chen
Browse files

net: hns3: fixed vf get max channels bug

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IALRBN


CVE: NA

--------------------------------------------------------

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.

Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarHao Lan <lanhao@huawei.com>
parent 48d5679b
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -3280,11 +3280,7 @@ static void hclgevf_uninit_ae_dev(struct hnae3_ae_dev *ae_dev)

static u32 hclgevf_get_max_channels(struct hclgevf_dev *hdev)
{
	struct hnae3_handle *nic = &hdev->nic;
	struct hnae3_knic_private_info *kinfo = &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);
}

/**