• Jesper Dangaard Brouer's avatar
    net: sched: fallback to qdisc noqueue if default qdisc setup fail · bf6dba76
    Jesper Dangaard Brouer authored
    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: default avatarJesper Dangaard Brouer <brouer@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bf6dba76
sch_generic.c 33.2 KB