Commit cd99a79a authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: HFSC: Use generic rate estimator

Makes HFSC use the generic rate estimator.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 10b7b643
...@@ -1100,11 +1100,9 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, ...@@ -1100,11 +1100,9 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
sch_tree_unlock(sch); sch_tree_unlock(sch);
#ifdef CONFIG_NET_ESTIMATOR #ifdef CONFIG_NET_ESTIMATOR
if (tca[TCA_RATE-1]) { if (tca[TCA_RATE-1])
qdisc_kill_estimator(&cl->stats); gen_replace_estimator(&cl->bstats, &cl->rate_est,
qdisc_new_estimator(&cl->stats, cl->stats_lock, cl->stats_lock, tca[TCA_RATE-1]);
tca[TCA_RATE-1]);
}
#endif #endif
return 0; return 0;
} }
...@@ -1162,8 +1160,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, ...@@ -1162,8 +1160,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
#ifdef CONFIG_NET_ESTIMATOR #ifdef CONFIG_NET_ESTIMATOR
if (tca[TCA_RATE-1]) if (tca[TCA_RATE-1])
qdisc_new_estimator(&cl->stats, cl->stats_lock, gen_new_estimator(&cl->bstats, &cl->rate_est,
tca[TCA_RATE-1]); cl->stats_lock, tca[TCA_RATE-1]);
#endif #endif
*arg = (unsigned long)cl; *arg = (unsigned long)cl;
return 0; return 0;
...@@ -1188,7 +1186,7 @@ hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) ...@@ -1188,7 +1186,7 @@ hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl)
hfsc_destroy_filters(&cl->filter_list); hfsc_destroy_filters(&cl->filter_list);
qdisc_destroy(cl->qdisc); qdisc_destroy(cl->qdisc);
#ifdef CONFIG_NET_ESTIMATOR #ifdef CONFIG_NET_ESTIMATOR
qdisc_kill_estimator(&cl->stats); gen_kill_estimator(&cl->bstats, &cl->rate_est);
#endif #endif
if (cl != &q->root) if (cl != &q->root)
kfree(cl); kfree(cl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment