diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2016-02-17 16:05:10 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-02-17 18:00:31 +0000 |
commit | 96504c28700902aa296085e6ccbfa8f18fd22d68 (patch) | |
tree | 2a2ebfbc3e4f7aaa2d750da84e5e84b02e5d76f5 | |
parent | 2c39d8f576204e90ff3d86b599ae1a7ba0d21ed9 (diff) | |
download | kernel_replicant_linux-96504c28700902aa296085e6ccbfa8f18fd22d68.tar.gz kernel_replicant_linux-96504c28700902aa296085e6ccbfa8f18fd22d68.tar.bz2 kernel_replicant_linux-96504c28700902aa296085e6ccbfa8f18fd22d68.zip |
IFF_NO_QUEUE: Fix for drivers not calling ether_setup() (regression in 4.3)
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch | 41 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 43 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 5befcf223198..c6bf41457d5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,7 @@ linux (4.4.1-1) UNRELEASED; urgency=medium - [i386/686-pae] mm: Fix types used in pgprot cacheability flags translations - [i386/686-pae] PCI: Set pci=nobios by default + * IFF_NO_QUEUE: Fix for drivers not calling ether_setup() (regression in 4.3) [ Roger Shimizu ] * Enable TTY_PRINTK as module (Closes: #814540). diff --git a/debian/patches/bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch b/debian/patches/bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch new file mode 100644 index 000000000000..defcd9602756 --- /dev/null +++ b/debian/patches/bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch @@ -0,0 +1,41 @@ +From: Phil Sutter <phil@nwl.cc> +Date: Wed, 17 Feb 2016 15:37:43 +0100 +Subject: IFF_NO_QUEUE: Fix for drivers not calling ether_setup() +Origin: http://mid.gmane.org/1455719863-25730-1-git-send-email-phil@nwl.cc + +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> +--- + net/core/dev.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -7125,8 +7125,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; diff --git a/debian/patches/series b/debian/patches/series index 646e47c4557c..379f50e2336c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -132,3 +132,4 @@ bugfix/x86/x86-efi-build-our-own-page-table-structures.patch bugfix/x86/x86-efi-setup-separate-efi-page-tables-in-kexec-path.patch bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch debian/i386-686-pae-pci-set-pci-nobios-by-default.patch +bugfix/all/iff_no_queue-fix-for-drivers-not-calling-ether_setup.patch |