]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/net/netfilter/xt_rateest.h
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.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 */