On Thu, 30 Apr 2020 13:42:22 +0200 Jesper Dangaard Brouer wrote:
> Currently if the default qdisc setup/init fails, the device ends up with
> qdisc "noop", which causes all TX packets to get dropped.
> 
> With the introduction of sysctl net/core/default_qdisc it is possible
> to change the default qdisc to be more advanced, which opens for the
> possibility that Qdisc_ops->init() can fail.
> 
> This patch detect these kind of failures, and choose to fallback to
> qdisc "noqueue", which is so simple that its init call will not fail.
> This allows the interface to continue functioning.
> 
> V2:
> As this also captures memory failures, which are transient, the
> device is not kept in IFF_NO_QUEUE state.  This allows the net_device
> to retry to default qdisc assignment.
> 
> Signed-off-by: Jesper Dangaard Brouer <bro...@redhat.com>

I have mixed feelings about this one, I wonder if I'm the only one.
Seems like failure to allocate the default qdisc is pretty critical,
the log message may be missed, especially in the boot time noise.

I think a WARN_ON() is in order here, I'd personally just replace the
netdev_info with a WARN_ON, without the fallback.

Reply via email to