Commit be5929b8 authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

net: hns3: remove unnecessary hns3_adjust_tqps_num

The parameter passed to hns3_set_channels() are already the number of
queues per channel of the enabled TC, so it is not need to divide
the number of enabled TCs.
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a81aca01
...@@ -4183,11 +4183,6 @@ static int hns3_modify_tqp_num(struct net_device *netdev, u16 new_tqp_num) ...@@ -4183,11 +4183,6 @@ static int hns3_modify_tqp_num(struct net_device *netdev, u16 new_tqp_num)
return ret; return ret;
} }
static int hns3_adjust_tqps_num(u8 num_tc, u32 new_tqp_num)
{
return (new_tqp_num / num_tc) * num_tc;
}
int hns3_set_channels(struct net_device *netdev, int hns3_set_channels(struct net_device *netdev,
struct ethtool_channels *ch) struct ethtool_channels *ch)
{ {
...@@ -4211,7 +4206,6 @@ int hns3_set_channels(struct net_device *netdev, ...@@ -4211,7 +4206,6 @@ int hns3_set_channels(struct net_device *netdev,
return -EINVAL; return -EINVAL;
} }
new_tqp_num = hns3_adjust_tqps_num(kinfo->num_tc, new_tqp_num);
if (kinfo->num_tqps == new_tqp_num) if (kinfo->num_tqps == new_tqp_num)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment