lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB8PR04MB6828F8C888DD8D532C34302FE0D30@DB8PR04MB6828.eurprd04.prod.outlook.com>
Date:   Thu, 23 Apr 2020 19:49:24 +0000
From:   Ioana Ciornei <ioana.ciornei@....com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
        Nipun Gupta <nipun.gupta@....com>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>
Subject: RE: [PATCH net-next 2/2] dpaa2-eth: fix return codes used in
 ndo_setup_tc

> Subject: [PATCH net-next 2/2] dpaa2-eth: fix return codes used in ndo_setup_tc
> 
> 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: ab1e6de2bd49 ("dpaa2-eth: Add mqprio support")
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---

Tested-by: Ioana Ciornei <ioana.ciornei@....com>

>  drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> index 873b66ed3aee..a72f5a0d9e7c 100644
> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
> @@ -2055,7 +2055,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); @@ -2067,7 +2067,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) {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ