Patrick McHardy | 5859034 | 2007-12-04 23:40:05 -0800 | [diff] [blame] | 1 | #ifndef _XT_RATEEST_H |
| 2 | #define _XT_RATEEST_H |
| 3 | |
| 4 | struct xt_rateest { |
Eric Dumazet | 339bb99 | 2010-06-08 14:11:19 +0200 | [diff] [blame] | 5 | /* 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 Dumazet | 45203a3 | 2013-06-06 08:43:22 -0700 | [diff] [blame] | 9 | struct gnet_stats_rate_est64 rstats; |
Eric Dumazet | 339bb99 | 2010-06-08 14:11:19 +0200 | [diff] [blame] | 10 | |
| 11 | /* following fields not accessed in hot path */ |
Patrick McHardy | 5859034 | 2007-12-04 23:40:05 -0800 | [diff] [blame] | 12 | struct hlist_node list; |
| 13 | char name[IFNAMSIZ]; |
| 14 | unsigned int refcnt; |
Patrick McHardy | 5859034 | 2007-12-04 23:40:05 -0800 | [diff] [blame] | 15 | struct gnet_estimator params; |
Eric Dumazet | c7de2cf | 2010-06-09 02:09:23 +0000 | [diff] [blame] | 16 | struct rcu_head rcu; |
Patrick McHardy | 5859034 | 2007-12-04 23:40:05 -0800 | [diff] [blame] | 17 | }; |
| 18 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 19 | struct xt_rateest *xt_rateest_lookup(const char *name); |
| 20 | void xt_rateest_put(struct xt_rateest *est); |
Patrick McHardy | 5859034 | 2007-12-04 23:40:05 -0800 | [diff] [blame] | 21 | |
| 22 | #endif /* _XT_RATEEST_H */ |