dpaa2-eth: fix return codes used in ndo_setup_tc
[ Upstream commit5.4-rM2-2.2.x-imx-squashedb89c1e6bdc
] Drivers ndo_setup_tc call should return -EOPNOTSUPP, when it cannot support the qdisc type. Other return values will result in failing the qdisc setup. This lead to qdisc noop getting assigned, which will drop all TX packets on the interface. Fixes:ab1e6de2bd
("dpaa2-eth: Add mqprio support") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
parent
04ab099d1e
commit
d1a00c9bb1
|
@ -1981,7 +1981,7 @@ static int dpaa2_eth_setup_tc(struct net_device *net_dev,
|
|||
int i;
|
||||
|
||||
if (type != TC_SETUP_QDISC_MQPRIO)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mqprio->hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
||||
num_queues = dpaa2_eth_queue_count(priv);
|
||||
|
@ -1993,7 +1993,7 @@ static int dpaa2_eth_setup_tc(struct net_device *net_dev,
|
|||
if (num_tc > dpaa2_eth_tc_count(priv)) {
|
||||
netdev_err(net_dev, "Max %d traffic classes supported\n",
|
||||
dpaa2_eth_tc_count(priv));
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!num_tc) {
|
||||
|
|
Loading…
Reference in New Issue