]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
IFF_NO_QUEUE: Fix for drivers not calling ether_setup()
authorPhil Sutter <phil@nwl.cc>
Wed, 17 Feb 2016 14:37:43 +0000 (15:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 19:56:53 +0000 (14:56 -0500)
commita813104d923339144078939175faf4e66aca19b4
tree8ac5aed32c264210aa2b8f7a74c234e6fd0a46b4
parentd13b161c2c7c67401bb222c30302339285ac148e
IFF_NO_QUEUE: Fix for drivers not calling ether_setup()

My implementation around IFF_NO_QUEUE driver flag assumed that leaving
tx_queue_len untouched (specifically: not setting it to zero) by drivers
would make it possible to assign a regular qdisc to them without having
to worry about setting tx_queue_len to a useful value. This was only
partially true: I overlooked that some drivers don't call ether_setup()
and therefore not initialize tx_queue_len to the default value of 1000.
Consequently, removing the workarounds in place for that case in qdisc
implementations which cared about it (namely, pfifo, bfifo, gred, htb,
plug and sfb) leads to problems with these specific interface types and
qdiscs.

Luckily, there's already a sanitization point for drivers setting
tx_queue_len to zero, which can be reused to assign the fallback value
most qdisc implementations used, which is 1.

Fixes: 348e3435cbefa ("net: sched: drop all special handling of tx_queue_len == 0")
Tested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c