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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Apr 2020 19:51:41 +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 1/2] net: sched: report ndo_setup_tc failures via
 extack

> Subject: [PATCH net-next 1/2] net: sched: report ndo_setup_tc failures via
> extack
> 
> Help end-users of the 'tc' command to see if the drivers ndo_setup_tc function
> call fails. Troubleshooting when this happens is non-trivial (see full process
> here[1]), and results in net_device getting assigned the 'qdisc noop', which will
> drop all TX packets on the interface.
> 
> [1]:
> https://github.com/xdp-project/xdp-project/blob/master/areas/arm64/board_nxp_ls1088/nxp-board04-troubleshoot-qdisc.org
> 
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---

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

>  net/sched/cls_api.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index
> 55bd1429678f..11b683c45c28 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -735,8 +735,11 @@ static int tcf_block_offload_cmd(struct tcf_block
> *block,
>  	INIT_LIST_HEAD(&bo.cb_list);
> 
>  	err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_BLOCK, &bo);
> -	if (err < 0)
> +	if (err < 0) {
> +		if (err != -EOPNOTSUPP)
> +			NL_SET_ERR_MSG(extack, "Driver ndo_setup_tc
> failed");
>  		return err;
> +	}
> 
>  	return tcf_block_setup(block, &bo);
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ