| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH 9/16] CBQ: Use generic rate estimator |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Thu, 21 Oct 2004 14:44:26 +0200 |
| Cc: | netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx |
| In-reply-to: | <20041021123209.GE21977@postel.suug.ch> |
| References: | <20041021123209.GE21977@postel.suug.ch> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Makes CBQ use the generic rate estimator.
Signed-off-by: Thomas Graf <tgraf@xxxxxxx>
--- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 13:00:53.000000000
+0200
+++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 13:01:20.000000000 +0200
@@ -1759,7 +1759,7 @@
qdisc_destroy(cl->q);
qdisc_put_rtab(cl->R_tab);
#ifdef CONFIG_NET_ESTIMATOR
- qdisc_kill_estimator(&cl->stats);
+ gen_kill_estimator(&cl->bstats, &cl->rate_est);
#endif
if (cl != &q->link)
kfree(cl);
@@ -1905,11 +1905,9 @@
sch_tree_unlock(sch);
#ifdef CONFIG_NET_ESTIMATOR
- if (tca[TCA_RATE-1]) {
- qdisc_kill_estimator(&cl->stats);
- qdisc_new_estimator(&cl->stats, cl->stats_lock,
- tca[TCA_RATE-1]);
- }
+ if (tca[TCA_RATE-1])
+ gen_replace_estimator(&cl->bstats, &cl->rate_est,
+ cl->stats_lock, tca[TCA_RATE-1]);
#endif
return 0;
}
@@ -1999,8 +1997,8 @@
#ifdef CONFIG_NET_ESTIMATOR
if (tca[TCA_RATE-1])
- qdisc_new_estimator(&cl->stats, cl->stats_lock,
- tca[TCA_RATE-1]);
+ gen_new_estimator(&cl->bstats, &cl->rate_est,
+ cl->stats_lock, tca[TCA_RATE-1]);
#endif
*arg = (unsigned long)cl;
|
| Previous by Date: | [PATCH 8/16] CBQ: Use dump_stats for class statistics dumping, Thomas Graf |
|---|---|
| Next by Date: | [PATCH 10/16] HTB: Use gnet_stats for class statistics, Thomas Graf |
| Previous by Thread: | [PATCH 8/16] CBQ: Use dump_stats for class statistics dumping, Thomas Graf |
| Next by Thread: | [PATCH 10/16] HTB: Use gnet_stats for class statistics, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |