Home
last modified time | relevance | path

Searched refs:afinfo (Results 1 – 8 of 8) sorted by relevance

/net/xfrm/
Dxfrm_input.c51 int xfrm_input_register_afinfo(const struct xfrm_input_afinfo *afinfo) in xfrm_input_register_afinfo() argument
55 if (WARN_ON(afinfo->family >= ARRAY_SIZE(xfrm_input_afinfo))) in xfrm_input_register_afinfo()
59 if (unlikely(xfrm_input_afinfo[afinfo->family] != NULL)) in xfrm_input_register_afinfo()
62 rcu_assign_pointer(xfrm_input_afinfo[afinfo->family], afinfo); in xfrm_input_register_afinfo()
68 int xfrm_input_unregister_afinfo(const struct xfrm_input_afinfo *afinfo) in xfrm_input_unregister_afinfo() argument
73 if (likely(xfrm_input_afinfo[afinfo->family] != NULL)) { in xfrm_input_unregister_afinfo()
74 if (unlikely(xfrm_input_afinfo[afinfo->family] != afinfo)) in xfrm_input_unregister_afinfo()
77 RCU_INIT_POINTER(xfrm_input_afinfo[afinfo->family], NULL); in xfrm_input_unregister_afinfo()
87 const struct xfrm_input_afinfo *afinfo; in xfrm_input_get_afinfo() local
93 afinfo = rcu_dereference(xfrm_input_afinfo[family]); in xfrm_input_get_afinfo()
[all …]
Dxfrm_state.c184 struct xfrm_state_afinfo *afinfo = xfrm_state_get_afinfo(family); in xfrm_register_type() local
187 if (!afinfo) in xfrm_register_type()
197 X(afinfo, type, comp); in xfrm_register_type()
200 X(afinfo, type, ah); in xfrm_register_type()
203 X(afinfo, type, esp); in xfrm_register_type()
206 X(afinfo, type, ipip); in xfrm_register_type()
209 X(afinfo, type, dstopts); in xfrm_register_type()
212 X(afinfo, type, routing); in xfrm_register_type()
215 X(afinfo, type, ipip6); in xfrm_register_type()
230 struct xfrm_state_afinfo *afinfo = xfrm_state_get_afinfo(family); in xfrm_unregister_type() local
[all …]
Dxfrm_output.c619 const struct xfrm_state_afinfo *afinfo; in xfrm_inner_extract_output() local
633 afinfo = xfrm_state_afinfo_get_rcu(inner_mode->family); in xfrm_inner_extract_output()
634 if (likely(afinfo)) in xfrm_inner_extract_output()
635 err = afinfo->extract_output(x, skb); in xfrm_inner_extract_output()
644 struct xfrm_state_afinfo *afinfo; in xfrm_local_error() local
654 afinfo = xfrm_state_get_afinfo(proto); in xfrm_local_error()
655 if (afinfo) { in xfrm_local_error()
656 afinfo->local_error(skb, mtu); in xfrm_local_error()
Dxfrm_policy.c239 const struct xfrm_policy_afinfo *afinfo; in xfrm_policy_get_afinfo() local
244 afinfo = rcu_dereference(xfrm_policy_afinfo[family]); in xfrm_policy_get_afinfo()
245 if (unlikely(!afinfo)) in xfrm_policy_get_afinfo()
247 return afinfo; in xfrm_policy_get_afinfo()
261 const struct xfrm_policy_afinfo *afinfo; in __xfrm_dst_lookup() local
264 afinfo = xfrm_policy_get_afinfo(family); in __xfrm_dst_lookup()
265 if (unlikely(afinfo == NULL)) in __xfrm_dst_lookup()
268 dst = afinfo->dst_lookup(net, tos, oif, saddr, daddr, mark); in __xfrm_dst_lookup()
2355 const struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in xfrm_get_saddr() local
2357 if (unlikely(afinfo == NULL)) in xfrm_get_saddr()
[all …]
/net/ipv4/
Dxfrm4_output.c69 const struct xfrm_state_afinfo *afinfo; in __xfrm4_output() local
80 afinfo = xfrm_state_afinfo_get_rcu(x->outer_mode.family); in __xfrm4_output()
81 if (likely(afinfo)) in __xfrm4_output()
82 ret = afinfo->output_finish(sk, skb); in __xfrm4_output()
Dudp.c2846 struct udp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in udp_get_first() local
2850 for (state->bucket = start; state->bucket <= afinfo->udp_table->mask; in udp_get_first()
2852 struct udp_hslot *hslot = &afinfo->udp_table->hash[state->bucket]; in udp_get_first()
2861 if (sk->sk_family == afinfo->family) in udp_get_first()
2873 struct udp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in udp_get_next() local
2879 } while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != afinfo->family)); in udp_get_next()
2882 if (state->bucket <= afinfo->udp_table->mask) in udp_get_next()
2883 spin_unlock_bh(&afinfo->udp_table->hash[state->bucket].lock); in udp_get_next()
2924 struct udp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in udp_seq_stop() local
2927 if (state->bucket <= afinfo->udp_table->mask) in udp_seq_stop()
[all …]
Dtcp_ipv4.c2174 struct tcp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in listening_get_next() local
2198 if (sk->sk_family == afinfo->family) in listening_get_next()
2235 struct tcp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in established_get_first() local
2252 if (sk->sk_family != afinfo->family || in established_get_first()
2267 struct tcp_seq_afinfo *afinfo = PDE_DATA(file_inode(seq->file)); in established_get_next() local
2279 if (sk->sk_family == afinfo->family && in established_get_next()
/net/ipv6/
Dxfrm6_output.c122 const struct xfrm_state_afinfo *afinfo; in __xfrm6_output_state_finish() local
126 afinfo = xfrm_state_afinfo_get_rcu(x->outer_mode.family); in __xfrm6_output_state_finish()
127 if (likely(afinfo)) in __xfrm6_output_state_finish()
128 ret = afinfo->output_finish(sk, skb); in __xfrm6_output_state_finish()