diff options
author | Eric Dumazet <edumazet@google.com> | 2016-03-02 11:21:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-03 17:38:46 -0500 |
commit | 1f27cde313d72d6b44a73ba89c8b2c6a99c628cf (patch) | |
tree | 827ad853aec72793016f8f7302eb2a345bab2319 /include/net/sch_generic.h | |
parent | 799977d9aafbf0ca0b9c39b04cbfb16db71302c9 (diff) |
net: sched: use pfifo_fast for non real queues
Some devices declare a high number of TX queues, then set a much
lower real_num_tx_queues
This cause setups using fq_codel, sfq or fq as the default qdisc to consume
more memory than really needed.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index e5bba897d206..46e55f0202a6 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -345,6 +345,12 @@ extern struct Qdisc_ops pfifo_fast_ops; | |||
345 | extern struct Qdisc_ops mq_qdisc_ops; | 345 | extern struct Qdisc_ops mq_qdisc_ops; |
346 | extern struct Qdisc_ops noqueue_qdisc_ops; | 346 | extern struct Qdisc_ops noqueue_qdisc_ops; |
347 | extern const struct Qdisc_ops *default_qdisc_ops; | 347 | extern const struct Qdisc_ops *default_qdisc_ops; |
348 | static inline const struct Qdisc_ops * | ||
349 | get_default_qdisc_ops(const struct net_device *dev, int ntx) | ||
350 | { | ||
351 | return ntx < dev->real_num_tx_queues ? | ||
352 | default_qdisc_ops : &pfifo_fast_ops; | ||
353 | } | ||
348 | 354 | ||
349 | struct Qdisc_class_common { | 355 | struct Qdisc_class_common { |
350 | u32 classid; | 356 | u32 classid; |