diff options
author | stephen hemminger <stephen@networkplumber.org> | 2017-04-13 18:40:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-17 20:23:06 +0300 |
commit | 8ea3e439115a50b1927a4d035b2f84c46fc61c42 (patch) | |
tree | 8625511224c100bdd07016eea85d0bad0027d235 /net/sched/sch_api.c | |
parent | 7ca9511813c991f44b9e1b94aeeee488df401580 (diff) | |
download | linux-8ea3e439115a50b1927a4d035b2f84c46fc61c42.tar.xz |
Subject: net: allow configuring default qdisc
Since 3.12 it has been possible to configure the default queuing
discipline via sysctl. This patch adds ability to configure the
default queue discipline in kernel configuration. This is useful for
environments where configuring the value from userspace is difficult
to manage.
The default is still the same as before (pfifo_fast) and it is
possible to change after kernel init with sysctl. This is similar
to how TCP congestion control works.
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index fcb5ae581c04..9b09ef9f944d 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -251,6 +251,15 @@ int qdisc_set_default(const char *name) return ops ? 0 : -ENOENT; } +#ifdef CONFIG_NET_SCH_DEFAULT +/* Set default value from kernel config */ +static int __init sch_default_qdisc(void) +{ + return qdisc_set_default(CONFIG_DEFAULT_NET_SCH); +} +late_initcall(sch_default_qdisc); +#endif + /* We know handle. Find qdisc among all qdisc's attached to device * (root qdisc, all its children, children of children etc.) * Note: caller either uses rtnl or rcu_read_lock() |