Skip to content

Commit b3e75c0

Browse files
IronShenPaolo Abeni
authored andcommitted
net: hns3: fixed vf get max channels bug
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: 849e460 ("net: hns3: add ethtool_ops.get_channels support for VF") Signed-off-by: Jian Shen <[email protected]> Signed-off-by: Hao Lan <[email protected]> Signed-off-by: Jijie Shao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent cde3046 commit b3e75c0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3094,11 +3094,7 @@ static void hclgevf_uninit_ae_dev(struct hnae3_ae_dev *ae_dev)
30943094

30953095
static u32 hclgevf_get_max_channels(struct hclgevf_dev *hdev)
30963096
{
3097-
struct hnae3_handle *nic = &hdev->nic;
3098-
struct hnae3_knic_private_info *kinfo = &nic->kinfo;
3099-
3100-
return min_t(u32, hdev->rss_size_max,
3101-
hdev->num_tqps / kinfo->tc_info.num_tc);
3097+
return min(hdev->rss_size_max, hdev->num_tqps);
31023098
}
31033099

31043100
/**

0 commit comments

Comments
 (0)