]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
5859034d PM |
2 | #ifndef _XT_RATEEST_H |
3 | #define _XT_RATEEST_H | |
4 | ||
1c0d32fd ED |
5 | #include <net/gen_stats.h> |
6 | ||
5859034d | 7 | struct xt_rateest { |
339bb99e ED |
8 | /* keep lock and bstats on same cache line to speedup xt_rateest_tg() */ |
9 | struct gnet_stats_basic_packed bstats; | |
10 | spinlock_t lock; | |
1c0d32fd | 11 | |
339bb99e ED |
12 | |
13 | /* following fields not accessed in hot path */ | |
1c0d32fd | 14 | unsigned int refcnt; |
5859034d PM |
15 | struct hlist_node list; |
16 | char name[IFNAMSIZ]; | |
5859034d | 17 | struct gnet_estimator params; |
c7de2cf0 | 18 | struct rcu_head rcu; |
1c0d32fd ED |
19 | |
20 | /* keep this field far away to speedup xt_rateest_mt() */ | |
21 | struct net_rate_estimator __rcu *rate_est; | |
5859034d PM |
22 | }; |
23 | ||
4e77be46 JP |
24 | struct xt_rateest *xt_rateest_lookup(const char *name); |
25 | void xt_rateest_put(struct xt_rateest *est); | |
5859034d PM |
26 | |
27 | #endif /* _XT_RATEEST_H */ |