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

[PKT_SCHED]: Introduce gen_replace_estimator

Introduces gen_replace_estimator.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5e370d5
...@@ -41,5 +41,8 @@ extern int gen_new_estimator(struct gnet_stats_basic *bstats, ...@@ -41,5 +41,8 @@ extern int gen_new_estimator(struct gnet_stats_basic *bstats,
spinlock_t *stats_lock, struct rtattr *opt); spinlock_t *stats_lock, struct rtattr *opt);
extern void gen_kill_estimator(struct gnet_stats_basic *bstats, extern void gen_kill_estimator(struct gnet_stats_basic *bstats,
struct gnet_stats_rate_est *rate_est); struct gnet_stats_rate_est *rate_est);
extern int gen_replace_estimator(struct gnet_stats_basic *bstats,
struct gnet_stats_rate_est *rate_est,
spinlock_t *stats_lock, struct rtattr *opt);
#endif #endif
...@@ -200,5 +200,16 @@ void gen_kill_estimator(struct gnet_stats_basic *bstats, ...@@ -200,5 +200,16 @@ void gen_kill_estimator(struct gnet_stats_basic *bstats,
} }
} }
int
gen_replace_estimator(struct gnet_stats_basic *bstats,
struct gnet_stats_rate_est *rate_est, spinlock_t *stats_lock,
struct rtattr *opt)
{
gen_kill_estimator(bstats, rate_est);
return gen_new_estimator(bstats, rate_est, stats_lock, opt);
}
EXPORT_SYMBOL(gen_kill_estimator); EXPORT_SYMBOL(gen_kill_estimator);
EXPORT_SYMBOL(gen_new_estimator); EXPORT_SYMBOL(gen_new_estimator);
EXPORT_SYMBOL(gen_replace_estimator);
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