2007-12-05 00:40:05 -07:00
|
|
|
#ifndef _XT_RATEEST_H
|
|
|
|
#define _XT_RATEEST_H
|
|
|
|
|
|
|
|
struct xt_rateest {
|
2010-06-08 06:11:19 -06: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 09:43:22 -06:00
|
|
|
struct gnet_stats_rate_est64 rstats;
|
2010-06-08 06:11:19 -06:00
|
|
|
|
|
|
|
/* following fields not accessed in hot path */
|
2007-12-05 00:40:05 -07:00
|
|
|
struct hlist_node list;
|
|
|
|
char name[IFNAMSIZ];
|
|
|
|
unsigned int refcnt;
|
|
|
|
struct gnet_estimator params;
|
2010-06-08 20:09:23 -06:00
|
|
|
struct rcu_head rcu;
|
2007-12-05 00:40:05 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct xt_rateest *xt_rateest_lookup(const char *name);
|
|
|
|
extern void xt_rateest_put(struct xt_rateest *est);
|
|
|
|
|
|
|
|
#endif /* _XT_RATEEST_H */
|