net: sched: change return value of ndo_setup_tc for driver supporting mqprio only
Change the return value from -EINVAL to -EOPNOTSUPP. The rest of the drivers have it like that, so be aligned. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
d7c1c8d2e5
Коммит
38cf0426e5
|
@ -1925,7 +1925,7 @@ static int xgbe_setup_tc(struct net_device *netdev, enum tc_setup_type type,
|
|||
u8 tc;
|
||||
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc_to_netdev->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
tc = tc_to_netdev->mqprio->num_tc;
|
||||
|
|
|
@ -4288,7 +4288,7 @@ int __bnx2x_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *tc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
|
||||
|
|
|
@ -7241,7 +7241,7 @@ static int bnxt_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *ntc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
ntc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ static int dpaa_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
|
|||
int i;
|
||||
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
num_tc = tc->mqprio->num_tc;
|
||||
|
|
|
@ -1223,7 +1223,7 @@ static int hns3_nic_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *tc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return hns3_setup_tc(dev, tc->mqprio->num_tc);
|
||||
}
|
||||
|
|
|
@ -1269,7 +1269,7 @@ static int __fm10k_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *tc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
|
||||
|
|
|
@ -5660,7 +5660,7 @@ static int __i40e_setup_tc(struct net_device *netdev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *tc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ static int __mlx4_en_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
struct tc_to_netdev *tc)
|
||||
{
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (tc->mqprio->num_tc && tc->mqprio->num_tc != MLX4_EN_NUM_UP_HIGH)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -435,7 +435,7 @@ int ef4_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
|
|||
int rc;
|
||||
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
num_tc = ntc->mqprio->num_tc;
|
||||
|
||||
|
|
|
@ -663,7 +663,7 @@ int efx_setup_tc(struct net_device *net_dev, enum tc_setup_type type,
|
|||
int rc;
|
||||
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
num_tc = ntc->mqprio->num_tc;
|
||||
|
||||
|
|
|
@ -1887,7 +1887,7 @@ static int netcp_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
|||
ASSERT_RTNL();
|
||||
|
||||
if (type != TC_SETUP_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
tc->mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
num_tc = tc->mqprio->num_tc;
|
||||
|
|
Загрузка…
Ссылка в новой задаче