netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: [net-next PATCH] net: sched: document attach_default_qdiscs
Date: Mon, 14 Sep 2015 17:31:30 +0200	[thread overview]
Message-ID: <1442244690-6672-1-git-send-email-phil@nwl.cc> (raw)

The process of selecting an interface's default qdisc is not really
intuitive, at least because there are three different cases to consider.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 net/sched/sch_generic.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index cb5d4ad..d7eaa51 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -741,6 +741,18 @@ static void attach_one_default_qdisc(struct net_device *dev,
 	dev_queue->qdisc_sleeping = qdisc;
 }
 
+/**
+ *	attach_default_qdiscs - set qdiscs back to default
+ *	@dev: network device to attach to
+ *
+ * This function attaches the (configurable) default qdisc to
+ * an interface.
+ * The actual default depends: Non-MQ, physical interfaces
+ * get whatever default_qdisc_ops has been set to. Multiqueue
+ * interfaces get mq, which uses default_qdisc_ops for it's
+ * leaves. Finally, virtual interfaces unconditionally
+ * default to noqueue.
+ */
 static void attach_default_qdiscs(struct net_device *dev)
 {
 	struct netdev_queue *txq;
-- 
2.1.2

             reply	other threads:[~2015-09-14 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 15:31 Phil Sutter [this message]
2015-09-14 22:07 ` [net-next PATCH] net: sched: document attach_default_qdiscs Cong Wang
2015-09-14 22:42   ` Phil Sutter
2015-09-14 22:49     ` Cong Wang

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=1442244690-6672-1-git-send-email-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=davem@davemloft.net \
    --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).