diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2009-02-01 04:12:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-01 04:12:42 -0500 |
commit | b00355db3f88d96810a60011a30cfb2c3469409d (patch) | |
tree | 43331c769665e619892d8f97a38ce1d12b3a6363 /net/sched/sch_api.c | |
parent | eefef1cf7653cd4e0aaf743c00ae8345086cdc01 (diff) |
pkt_sched: sch_hfsc: sch_htb: Add non-work-conserving warning handler.
Patrick McHardy <kaber@trash.net> suggested:
> How about making this flag and the warning message (in a out-of-line
> function) globally available? Other qdiscs (f.i. HFSC) can't deal with
> inner non-work-conserving qdiscs as well.
This patch uses qdisc->flags field of "suspected" child qdisc.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 0fc4a18fd96f..32009793307b 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -444,6 +444,17 @@ out: | |||
444 | } | 444 | } |
445 | EXPORT_SYMBOL(qdisc_calculate_pkt_len); | 445 | EXPORT_SYMBOL(qdisc_calculate_pkt_len); |
446 | 446 | ||
447 | void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc) | ||
448 | { | ||
449 | if (!(qdisc->flags & TCQ_F_WARN_NONWC)) { | ||
450 | printk(KERN_WARNING | ||
451 | "%s: %s qdisc %X: is non-work-conserving?\n", | ||
452 | txt, qdisc->ops->id, qdisc->handle >> 16); | ||
453 | qdisc->flags |= TCQ_F_WARN_NONWC; | ||
454 | } | ||
455 | } | ||
456 | EXPORT_SYMBOL(qdisc_warn_nonwc); | ||
457 | |||
447 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | 458 | static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) |
448 | { | 459 | { |
449 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, | 460 | struct qdisc_watchdog *wd = container_of(timer, struct qdisc_watchdog, |