diff options
author | Jarek Poplawski <jarkao2@gmail.com> | 2008-11-27 00:24:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-27 00:24:32 +0100 |
commit | 244e6c2d0724bc4908a1995804704bdee3b31528 (patch) | |
tree | e208a765607733401302bf8582b37d1adab63c08 /include/net/gen_stats.h | |
parent | smc-mca: Fix build failure due to typo. (diff) | |
download | linux-244e6c2d0724bc4908a1995804704bdee3b31528.tar.xz linux-244e6c2d0724bc4908a1995804704bdee3b31528.zip |
pkt_sched: gen_estimator: Optimize gen_estimator_active()
Since all other gen_estimator functions use bstats and rate_est params
together, and searching for them is optimized now, let's use this also
in gen_estimator_active(). The return type of gen_estimator_active()
is changed to bool, and gen_find_node() parameters to const, btw.
In tcf_act_police_locate() a check for ACT_P_CREATED is added before
calling gen_estimator_active().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/gen_stats.h')
-rw-r--r-- | include/net/gen_stats.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index dcf5bfa7d4f1..d136b5240ef2 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h @@ -45,6 +45,6 @@ extern void gen_kill_estimator(struct gnet_stats_basic *bstats, extern int gen_replace_estimator(struct gnet_stats_basic *bstats, struct gnet_stats_rate_est *rate_est, spinlock_t *stats_lock, struct nlattr *opt); -extern int gen_estimator_active(const struct gnet_stats_rate_est *rate_est); - +extern bool gen_estimator_active(const struct gnet_stats_basic *bstats, + const struct gnet_stats_rate_est *rate_est); #endif |