]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/net/netns/xfrm.h
xfrm: remove useless hash_resize_mutex locks
[mirror_ubuntu-artful-kernel.git] / include / net / netns / xfrm.h
CommitLineData
d62ddc21
AD
1#ifndef __NETNS_XFRM_H
2#define __NETNS_XFRM_H
3
9d4139c7 4#include <linux/list.h>
50a30657 5#include <linux/wait.h>
63082733 6#include <linux/workqueue.h>
8b18f8ea 7#include <linux/xfrm.h>
d7c7544c 8#include <net/dst_ops.h>
ca925cf1 9#include <net/flowcache.h>
9d4139c7 10
b27aeadb
AD
11struct ctl_table_header;
12
a35f6c5d
AD
13struct xfrm_policy_hash {
14 struct hlist_head *table;
15 unsigned int hmask;
16};
17
d62ddc21 18struct netns_xfrm {
9d4139c7 19 struct list_head state_all;
73d189dc
AD
20 /*
21 * Hash table to find appropriate SA towards given target (endpoint of
22 * tunnel or destination of transport mode) allowed by selector.
23 *
24 * Main use is finding SA after policy selected tunnel or transport
25 * mode. Also, it can be used by ah/esp icmp error handler to find
26 * offending SA.
27 */
28 struct hlist_head *state_bydst;
d320bbb3 29 struct hlist_head *state_bysrc;
b754a4fd 30 struct hlist_head *state_byspi;
529983ec 31 unsigned int state_hmask;
0bf7c5b0 32 unsigned int state_num;
63082733 33 struct work_struct state_hash_work;
b8a0ae20 34 struct hlist_head state_gc_list;
c7837144 35 struct work_struct state_gc_work;
50a30657 36
adfcf0b2 37 struct list_head policy_all;
93b851c1 38 struct hlist_head *policy_byidx;
8100bea7 39 unsigned int policy_idx_hmask;
8b18f8ea 40 struct hlist_head policy_inexact[XFRM_POLICY_MAX * 2];
a35f6c5d 41 struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX * 2];
dc2caba7 42 unsigned int policy_count[XFRM_POLICY_MAX * 2];
66caf628 43 struct work_struct policy_hash_work;
a6483b79 44
d7c7544c 45
a6483b79 46 struct sock *nlsk;
d79d792e 47 struct sock *nlsk_stash;
b27aeadb
AD
48
49 u32 sysctl_aevent_etime;
50 u32 sysctl_aevent_rseqth;
51 int sysctl_larval_drop;
52 u32 sysctl_acq_expires;
53#ifdef CONFIG_SYSCTL
54 struct ctl_table_header *sysctl_hdr;
55#endif
8e602ce2
ED
56
57 struct dst_ops xfrm4_dst_ops;
dfd56b8b 58#if IS_ENABLED(CONFIG_IPV6)
8e602ce2
ED
59 struct dst_ops xfrm6_dst_ops;
60#endif
283bc9f3 61 spinlock_t xfrm_state_lock;
283bc9f3
FD
62 rwlock_t xfrm_policy_lock;
63 struct mutex xfrm_cfg_mutex;
ca925cf1
FD
64
65 /* flow cache part */
66 struct flow_cache flow_cache_global;
ca925cf1
FD
67 atomic_t flow_cache_genid;
68 struct list_head flow_cache_gc_list;
69 spinlock_t flow_cache_gc_lock;
70 struct work_struct flow_cache_gc_work;
71 struct work_struct flow_cache_flush_work;
72 struct mutex flow_flush_sem;
d62ddc21
AD
73};
74
75#endif