Patch "IFF_NO_QUEUE: Fix for drivers not calling ether_setup()" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
IFF_NO_QUEUE: Fix for drivers not calling ether_setup()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Feb 29 14:33:50 PST 2016
From: Phil Sutter <[email protected]>
Date: Wed, 17 Feb 2016 15:37:43 +0100
Subject: IFF_NO_QUEUE: Fix for drivers not calling ether_setup()
From: Phil Sutter <[email protected]>
[ Upstream commit a813104d923339144078939175faf4e66aca19b4 ]
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.
--- net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/core/dev.c +3 -1
@@ -7128,8 +7128,10 @@ struct net_device *alloc_netdev_mqs(int dev->priv_flags =IFF_XMIT_DST_RELEASE |IFF_XMIT_DST_RELEASE_PERM ;setup (dev); -if (!dev->tx_queue_len) +if (!dev->tx_queue_len) { dev->priv_flags |=IFF_NO_QUEUE ; + dev->tx_queue_len =1 ; + } dev->num_tx_queues = txqs; dev->real_num_tx_queues = txqs;
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch