]> bbs.cooldavid.org Git - net-next-2.6.git/blob - include/net/netfilter/xt_rateest.h
netfilter: xt_rateest: Better struct xt_rateest layout
[net-next-2.6.git] / include / net / netfilter / xt_rateest.h
1 #ifndef _XT_RATEEST_H
2 #define _XT_RATEEST_H
3
4 struct xt_rateest {
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() */
9         struct gnet_stats_rate_est      rstats;
10
11         /* following fields not accessed in hot path */
12         struct hlist_node               list;
13         char                            name[IFNAMSIZ];
14         unsigned int                    refcnt;
15         struct gnet_estimator           params;
16 };
17
18 extern struct xt_rateest *xt_rateest_lookup(const char *name);
19 extern void xt_rateest_put(struct xt_rateest *est);
20
21 #endif /* _XT_RATEEST_H */