diff options
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f12669819d1a..d17ed6fb2f70 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/pkt_sched.h> | 7 | #include <linux/pkt_sched.h> |
8 | #include <linux/pkt_cls.h> | 8 | #include <linux/pkt_cls.h> |
9 | #include <linux/percpu.h> | 9 | #include <linux/percpu.h> |
10 | #include <linux/dynamic_queue_limits.h> | ||
10 | #include <net/gen_stats.h> | 11 | #include <net/gen_stats.h> |
11 | #include <net/rtnetlink.h> | 12 | #include <net/rtnetlink.h> |
12 | 13 | ||
@@ -119,6 +120,21 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) | |||
119 | qdisc->__state &= ~__QDISC___STATE_RUNNING; | 120 | qdisc->__state &= ~__QDISC___STATE_RUNNING; |
120 | } | 121 | } |
121 | 122 | ||
123 | static inline bool qdisc_may_bulk(const struct Qdisc *qdisc) | ||
124 | { | ||
125 | return qdisc->flags & TCQ_F_ONETXQUEUE; | ||
126 | } | ||
127 | |||
128 | static inline int qdisc_avail_bulklimit(const struct netdev_queue *txq) | ||
129 | { | ||
130 | #ifdef CONFIG_BQL | ||
131 | /* Non-BQL migrated drivers will return 0, too. */ | ||
132 | return dql_avail(&txq->dql); | ||
133 | #else | ||
134 | return 0; | ||
135 | #endif | ||
136 | } | ||
137 | |||
122 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) | 138 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) |
123 | { | 139 | { |
124 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; | 140 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; |