]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/net/netfilter/xt_rateest.h
netfilter: rpfilter: fix incorrect loopback packet judgment
[mirror_ubuntu-zesty-kernel.git] / include / net / netfilter / xt_rateest.h
1 #ifndef _XT_RATEEST_H
2 #define _XT_RATEEST_H
3
4 #include <net/gen_stats.h>
5
6 struct xt_rateest {
7 /* keep lock and bstats on same cache line to speedup xt_rateest_tg() */
8 struct gnet_stats_basic_packed bstats;
9 spinlock_t lock;
10
11
12 /* following fields not accessed in hot path */
13 unsigned int refcnt;
14 struct hlist_node list;
15 char name[IFNAMSIZ];
16 struct gnet_estimator params;
17 struct rcu_head rcu;
18
19 /* keep this field far away to speedup xt_rateest_mt() */
20 struct net_rate_estimator __rcu *rate_est;
21 };
22
23 struct xt_rateest *xt_rateest_lookup(const char *name);
24 void xt_rateest_put(struct xt_rateest *est);
25
26 #endif /* _XT_RATEEST_H */