2007-12-05 07:40:05 +00:00
|
|
|
#ifndef _XT_RATEEST_H
|
|
|
|
#define _XT_RATEEST_H
|
|
|
|
|
|
|
|
struct xt_rateest {
|
2010-06-08 12:11:19 +00:00
|
|
|
/* keep lock and bstats on same cache line to speedup xt_rateest_tg() */
|
|
|
|
struct gnet_stats_basic_packed bstats;
|
|
|
|
spinlock_t lock;
|
|
|
|
/* keep rstats and lock on same cache line to speedup xt_rateest_mt() */
|
2013-06-06 15:43:22 +00:00
|
|
|
struct gnet_stats_rate_est64 rstats;
|
2010-06-08 12:11:19 +00:00
|
|
|
|
|
|
|
/* following fields not accessed in hot path */
|
2007-12-05 07:40:05 +00:00
|
|
|
struct hlist_node list;
|
|
|
|
char name[IFNAMSIZ];
|
|
|
|
unsigned int refcnt;
|
|
|
|
struct gnet_estimator params;
|
2010-06-09 02:09:23 +00:00
|
|
|
struct rcu_head rcu;
|
2007-12-05 07:40:05 +00:00
|
|
|
};
|
|
|
|
|
2013-09-23 18:37:48 +00:00
|
|
|
struct xt_rateest *xt_rateest_lookup(const char *name);
|
|
|
|
void xt_rateest_put(struct xt_rateest *est);
|
2007-12-05 07:40:05 +00:00
|
|
|
|
|
|
|
#endif /* _XT_RATEEST_H */
|