blob: 79f45e19f31eaa54deb8437ef4b883bec78def84 [file] [log] [blame]
Patrick McHardy58590342007-12-04 23:40:05 -08001#ifndef _XT_RATEEST_H
2#define _XT_RATEEST_H
3
4struct xt_rateest {
Eric Dumazet339bb992010-06-08 14:11:19 +02005 /* keep lock and bstats on same cache line to speedup xt_rateest_tg() */
6 struct gnet_stats_basic_packed bstats;
7 spinlock_t lock;
8 /* keep rstats and lock on same cache line to speedup xt_rateest_mt() */
Eric Dumazet45203a32013-06-06 08:43:22 -07009 struct gnet_stats_rate_est64 rstats;
Eric Dumazet339bb992010-06-08 14:11:19 +020010
11 /* following fields not accessed in hot path */
Patrick McHardy58590342007-12-04 23:40:05 -080012 struct hlist_node list;
13 char name[IFNAMSIZ];
14 unsigned int refcnt;
Patrick McHardy58590342007-12-04 23:40:05 -080015 struct gnet_estimator params;
Eric Dumazetc7de2cf2010-06-09 02:09:23 +000016 struct rcu_head rcu;
Patrick McHardy58590342007-12-04 23:40:05 -080017};
18
Joe Perches4e77be42013-09-23 11:37:48 -070019struct xt_rateest *xt_rateest_lookup(const char *name);
20void xt_rateest_put(struct xt_rateest *est);
Patrick McHardy58590342007-12-04 23:40:05 -080021
22#endif /* _XT_RATEEST_H */