From: Phil Sutter <phil@nwl.cc>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, eric.dumazet@gmail.com, brouer@redhat.com,
geert@linux-m68k.org
Subject: [net-next PATCH 2/4] net: sched: ignore tx_queue_len when assigning default qdisc
Date: Thu, 27 Aug 2015 21:21:37 +0200 [thread overview]
Message-ID: <1440703299-21243-3-git-send-email-phil@nwl.cc> (raw)
In-Reply-To: <1440703299-21243-1-git-send-email-phil@nwl.cc>
Since alloc_netdev_mqs() sets IFF_NO_QUEUE for drivers not initializing
tx_queue_len, it is safe to assume that if tx_queue_len is zero,
dev->priv flags always contains IFF_NO_QUEUE.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
net/sched/sch_generic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 942fea8..f501b74 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -735,7 +735,7 @@ static void attach_one_default_qdisc(struct net_device *dev,
{
struct Qdisc *qdisc = &noqueue_qdisc;
- if (dev->tx_queue_len && !(dev->priv_flags & IFF_NO_QUEUE)) {
+ if (!(dev->priv_flags & IFF_NO_QUEUE)) {
qdisc = qdisc_create_dflt(dev_queue,
default_qdisc_ops, TC_H_ROOT);
if (!qdisc) {
@@ -756,7 +756,6 @@ static void attach_default_qdiscs(struct net_device *dev)
txq = netdev_get_tx_queue(dev, 0);
if (!netif_is_multiqueue(dev) ||
- dev->tx_queue_len == 0 ||
dev->priv_flags & IFF_NO_QUEUE) {
netdev_for_each_tx_queue(dev, attach_one_default_qdisc, NULL);
dev->qdisc = txq->qdisc_sleeping;
--
2.1.2
next prev parent reply other threads:[~2015-08-27 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 19:21 [net-next PATCH 0/4] fixup IFF_NO_QUEUE conversion Phil Sutter
2015-08-27 19:21 ` [net-next PATCH 1/4] net: fix IFF_NO_QUEUE for drivers using alloc_netdev Phil Sutter
2015-08-27 19:21 ` Phil Sutter [this message]
2015-08-27 19:21 ` [net-next PATCH 3/4] net: sched: register noqueue qdisc Phil Sutter
2015-08-29 20:04 ` Sergei Shtylyov
2015-08-27 19:21 ` [net-next PATCH 4/4] net: sched: simplify attach_one_default_qdisc() Phil Sutter
2015-08-28 0:15 ` [net-next PATCH 0/4] fixup IFF_NO_QUEUE conversion David Miller
2015-09-01 7:52 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440703299-21243-3-git-send-email-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=geert@linux-m68k.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).