Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 92) sorted by relevance

1234

/net/xfrm/
Dxfrm_state.c53 static inline bool xfrm_state_hold_rcu(struct xfrm_state __rcu *x) in xfrm_state_hold_rcu() argument
55 return refcount_inc_not_zero(&x->refcnt); in xfrm_state_hold_rcu()
89 struct xfrm_state *x; in xfrm_hash_transfer() local
91 hlist_for_each_entry_safe(x, tmp, list, bydst) { in xfrm_hash_transfer()
94 h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
95 x->props.reqid, x->props.family, in xfrm_hash_transfer()
97 hlist_add_head_rcu(&x->bydst, ndsttable + h); in xfrm_hash_transfer()
99 h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr, in xfrm_hash_transfer()
100 x->props.family, in xfrm_hash_transfer()
102 hlist_add_head_rcu(&x->bysrc, nsrctable + h); in xfrm_hash_transfer()
[all …]
Dxfrm_replay.c12 u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq) in xfrm_replay_seqhi() argument
15 struct xfrm_replay_state_esn *replay_esn = x->replay_esn; in xfrm_replay_seqhi()
17 if (!(x->props.flags & XFRM_STATE_ESN)) in xfrm_replay_seqhi()
38 static void xfrm_replay_notify(struct xfrm_state *x, int event) in xfrm_replay_notify() argument
53 if (!x->replay_maxdiff || in xfrm_replay_notify()
54 ((x->replay.seq - x->preplay.seq < x->replay_maxdiff) && in xfrm_replay_notify()
55 (x->replay.oseq - x->preplay.oseq < x->replay_maxdiff))) { in xfrm_replay_notify()
56 if (x->xflags & XFRM_TIME_DEFER) in xfrm_replay_notify()
65 if (memcmp(&x->replay, &x->preplay, in xfrm_replay_notify()
67 x->xflags |= XFRM_TIME_DEFER; in xfrm_replay_notify()
[all …]
Dxfrm_output.c22 static int xfrm_inner_extract_output(struct xfrm_state *x, struct sk_buff *skb);
58 static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) in xfrm4_transport_output() argument
65 skb_set_network_header(skb, -x->props.header_len); in xfrm4_transport_output()
79 static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_transport_output() argument
89 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); in xfrm6_transport_output()
93 (prevhdr - x->props.header_len) - skb->data); in xfrm6_transport_output()
94 skb_set_network_header(skb, -x->props.header_len); in xfrm6_transport_output()
110 static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_ro_output() argument
119 hdr_len = x->type->hdr_offset(x, skb, &prevhdr); in xfrm6_ro_output()
123 (prevhdr - x->props.header_len) - skb->data); in xfrm6_ro_output()
[all …]
Dxfrm_device.c22 static void __xfrm_transport_prep(struct xfrm_state *x, struct sk_buff *skb, in __xfrm_transport_prep() argument
28 pskb_pull(skb, skb->mac_len + hsize + x->props.header_len); in __xfrm_transport_prep()
32 skb->transport_header -= x->props.header_len; in __xfrm_transport_prep()
36 static void __xfrm_mode_tunnel_prep(struct xfrm_state *x, struct sk_buff *skb, in __xfrm_mode_tunnel_prep() argument
46 pskb_pull(skb, skb->mac_len + x->props.header_len); in __xfrm_mode_tunnel_prep()
50 static void xfrm_outer_mode_prep(struct xfrm_state *x, struct sk_buff *skb) in xfrm_outer_mode_prep() argument
52 switch (x->outer_mode.encap) { in xfrm_outer_mode_prep()
54 if (x->outer_mode.family == AF_INET) in xfrm_outer_mode_prep()
55 return __xfrm_mode_tunnel_prep(x, skb, in xfrm_outer_mode_prep()
57 if (x->outer_mode.family == AF_INET6) in xfrm_outer_mode_prep()
[all …]
Dxfrm_input.c171 static int xfrm4_remove_beet_encap(struct xfrm_state *x, struct sk_buff *skb) in xfrm4_remove_beet_encap() argument
208 iph->daddr = x->sel.daddr.a4; in xfrm4_remove_beet_encap()
209 iph->saddr = x->sel.saddr.a4; in xfrm4_remove_beet_encap()
225 static int xfrm4_remove_tunnel_encap(struct xfrm_state *x, struct sk_buff *skb) in xfrm4_remove_tunnel_encap() argument
239 if (x->props.flags & XFRM_STATE_DECAP_DSCP) in xfrm4_remove_tunnel_encap()
241 if (!(x->props.flags & XFRM_STATE_NOECN)) in xfrm4_remove_tunnel_encap()
263 static int xfrm6_remove_tunnel_encap(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_remove_tunnel_encap() argument
276 if (x->props.flags & XFRM_STATE_DECAP_DSCP) in xfrm6_remove_tunnel_encap()
279 if (!(x->props.flags & XFRM_STATE_NOECN)) in xfrm6_remove_tunnel_encap()
293 static int xfrm6_remove_beet_encap(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_remove_beet_encap() argument
[all …]
Dxfrm_user.c314 static int attach_crypt(struct xfrm_state *x, struct nlattr *rta) in attach_crypt() argument
327 x->props.ealgo = algo->desc.sadb_alg_id; in attach_crypt()
334 x->ealg = p; in attach_crypt()
335 x->geniv = algo->uinfo.encr.geniv; in attach_crypt()
399 static int attach_aead(struct xfrm_state *x, struct nlattr *rta) in attach_aead() argument
412 x->props.ealgo = algo->desc.sadb_alg_id; in attach_aead()
419 x->aead = p; in attach_aead()
420 x->geniv = algo->uinfo.aead.geniv; in attach_aead()
493 static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *p) in copy_from_user_state() argument
495 memcpy(&x->id, &p->id, sizeof(x->id)); in copy_from_user_state()
[all …]
Dxfrm_ipcomp.c38 static int ipcomp_decompress(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_decompress() argument
40 struct ipcomp_data *ipcd = x->data; in ipcomp_decompress()
106 int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_input() argument
123 err = ipcomp_decompress(x, skb); in ipcomp_input()
134 static int ipcomp_compress(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_compress() argument
136 struct ipcomp_data *ipcd = x->data; in ipcomp_compress()
167 int ipcomp_output(struct xfrm_state *x, struct sk_buff *skb) in ipcomp_output() argument
171 struct ipcomp_data *ipcd = x->data; in ipcomp_output()
181 err = ipcomp_compress(x, skb); in ipcomp_output()
191 ipch->cpi = htons((u16 )ntohl(x->id.spi)); in ipcomp_output()
[all …]
/net/ipv4/
Desp4.c96 static void esp_ssg_unref(struct xfrm_state *x, void *tmp) in esp_ssg_unref() argument
99 struct crypto_aead *aead = x->data; in esp_ssg_unref()
105 if (x->props.flags & XFRM_STATE_ESN) in esp_ssg_unref()
125 struct xfrm_state *x; in esp_output_done() local
130 x = sp->xvec[sp->len - 1]; in esp_output_done()
132 x = skb_dst(skb)->xfrm; in esp_output_done()
136 esp_ssg_unref(x, tmp); in esp_output_done()
141 XFRM_INC_STATS(xs_net(x), LINUX_MIB_XFRMOUTSTATEPROTOERROR); in esp_output_done()
175 struct xfrm_state *x, in esp_output_set_extra() argument
183 if ((x->props.flags & XFRM_STATE_ESN)) { in esp_output_set_extra()
[all …]
Dipcomp.c28 struct xfrm_state *x; in ipcomp4_err() local
41 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ipcomp4_err()
43 if (!x) in ipcomp4_err()
50 xfrm_state_put(x); in ipcomp4_err()
56 static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) in ipcomp_tunnel_create() argument
58 struct net *net = xs_net(x); in ipcomp_tunnel_create()
66 t->id.spi = x->props.saddr.a4; in ipcomp_tunnel_create()
67 t->id.daddr.a4 = x->id.daddr.a4; in ipcomp_tunnel_create()
68 memcpy(&t->sel, &x->sel, sizeof(t->sel)); in ipcomp_tunnel_create()
70 t->props.mode = x->props.mode; in ipcomp_tunnel_create()
[all …]
Desp4_offload.c33 struct xfrm_state *x; in esp4_gro_receive() local
54 x = xfrm_state_lookup(dev_net(skb->dev), skb->mark, in esp4_gro_receive()
57 if (!x) in esp4_gro_receive()
60 skb->mark = xfrm_smark_get(skb->mark, x); in esp4_gro_receive()
62 sp->xvec[sp->len++] = x; in esp4_gro_receive()
67 xfrm_state_put(x); in esp4_gro_receive()
94 static void esp4_gso_encap(struct xfrm_state *x, struct sk_buff *skb) in esp4_gso_encap() argument
105 esph->spi = x->id.spi; in esp4_gso_encap()
111 static struct sk_buff *xfrm4_tunnel_gso_segment(struct xfrm_state *x, in xfrm4_tunnel_gso_segment() argument
119 static struct sk_buff *xfrm4_transport_gso_segment(struct xfrm_state *x, in xfrm4_transport_gso_segment() argument
[all …]
Dah4.c125 struct xfrm_state *x = skb_dst(skb)->xfrm; in ah_output_done() local
126 struct ah_data *ahp = x->data; in ah_output_done()
147 static int ah_output(struct xfrm_state *x, struct sk_buff *skb) in ah_output() argument
165 ahp = x->data; in ah_output()
176 if (x->props.flags & XFRM_STATE_ESN) { in ah_output()
215 if (x->props.flags & XFRM_STATE_ALIGN4) in ah_output()
221 ah->spi = x->id.spi; in ah_output()
229 if (x->props.flags & XFRM_STATE_ESN) { in ah_output()
271 struct xfrm_state *x = xfrm_input_state(skb); in ah_input_done() local
272 struct ah_data *ahp = x->data; in ah_input_done()
[all …]
/net/ipv6/
Desp6.c105 static void esp_ssg_unref(struct xfrm_state *x, void *tmp) in esp_ssg_unref() argument
107 struct crypto_aead *aead = x->data; in esp_ssg_unref()
113 if (x->props.flags & XFRM_STATE_ESN) in esp_ssg_unref()
132 struct xfrm_state *x; in esp_output_done() local
137 x = sp->xvec[sp->len - 1]; in esp_output_done()
139 x = skb_dst(skb)->xfrm; in esp_output_done()
143 esp_ssg_unref(x, tmp); in esp_output_done()
148 XFRM_INC_STATS(xs_net(x), LINUX_MIB_XFRMOUTSTATEPROTOERROR); in esp_output_done()
178 struct xfrm_state *x, in esp_output_set_esn() argument
186 if ((x->props.flags & XFRM_STATE_ESN)) { in esp_output_set_esn()
[all …]
Dipcomp6.c52 struct xfrm_state *x; in ipcomp6_err() local
59 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ipcomp6_err()
61 if (!x) in ipcomp6_err()
69 xfrm_state_put(x); in ipcomp6_err()
74 static struct xfrm_state *ipcomp6_tunnel_create(struct xfrm_state *x) in ipcomp6_tunnel_create() argument
76 struct net *net = xs_net(x); in ipcomp6_tunnel_create()
84 t->id.spi = xfrm6_tunnel_alloc_spi(net, (xfrm_address_t *)&x->props.saddr); in ipcomp6_tunnel_create()
88 memcpy(t->id.daddr.a6, x->id.daddr.a6, sizeof(struct in6_addr)); in ipcomp6_tunnel_create()
89 memcpy(&t->sel, &x->sel, sizeof(t->sel)); in ipcomp6_tunnel_create()
91 t->props.mode = x->props.mode; in ipcomp6_tunnel_create()
[all …]
Dmip6.c119 static int mip6_destopt_input(struct xfrm_state *x, struct sk_buff *skb) in mip6_destopt_input() argument
125 spin_lock(&x->lock); in mip6_destopt_input()
126 if (!ipv6_addr_equal(&iph->saddr, (struct in6_addr *)x->coaddr) && in mip6_destopt_input()
127 !ipv6_addr_any((struct in6_addr *)x->coaddr)) in mip6_destopt_input()
129 spin_unlock(&x->lock); in mip6_destopt_input()
138 static int mip6_destopt_output(struct xfrm_state *x, struct sk_buff *skb) in mip6_destopt_output() argument
165 spin_lock_bh(&x->lock); in mip6_destopt_output()
166 memcpy(&iph->saddr, x->coaddr, sizeof(iph->saddr)); in mip6_destopt_output()
167 spin_unlock_bh(&x->lock); in mip6_destopt_output()
169 WARN_ON(len != x->props.header_len); in mip6_destopt_output()
[all …]
Dxfrm6_input.c20 int xfrm6_extract_input(struct xfrm_state *x, struct sk_buff *skb) in xfrm6_extract_input() argument
88 struct xfrm_state *x = NULL; in xfrm6_input_addr() local
123 x = xfrm_state_lookup_byaddr(net, skb->mark, dst, src, proto, AF_INET6); in xfrm6_input_addr()
124 if (!x) in xfrm6_input_addr()
127 spin_lock(&x->lock); in xfrm6_input_addr()
129 if ((!i || (x->props.flags & XFRM_STATE_WILDRECV)) && in xfrm6_input_addr()
130 likely(x->km.state == XFRM_STATE_VALID) && in xfrm6_input_addr()
131 !xfrm_state_check_expire(x)) { in xfrm6_input_addr()
132 spin_unlock(&x->lock); in xfrm6_input_addr()
133 if (x->type->input(x, skb) > 0) { in xfrm6_input_addr()
[all …]
Desp6_offload.c54 struct xfrm_state *x; in esp6_gro_receive() local
76 x = xfrm_state_lookup(dev_net(skb->dev), skb->mark, in esp6_gro_receive()
79 if (!x) in esp6_gro_receive()
82 skb->mark = xfrm_smark_get(skb->mark, x); in esp6_gro_receive()
84 sp->xvec[sp->len++] = x; in esp6_gro_receive()
89 xfrm_state_put(x); in esp6_gro_receive()
121 static void esp6_gso_encap(struct xfrm_state *x, struct sk_buff *skb) in esp6_gso_encap() argument
132 esph->spi = x->id.spi; in esp6_gso_encap()
138 static struct sk_buff *xfrm6_tunnel_gso_segment(struct xfrm_state *x, in xfrm6_tunnel_gso_segment() argument
146 static struct sk_buff *xfrm6_transport_gso_segment(struct xfrm_state *x, in xfrm6_transport_gso_segment() argument
[all …]
Dah6.c293 struct xfrm_state *x = skb_dst(skb)->xfrm; in ah6_output_done() local
294 struct ah_data *ahp = x->data; in ah6_output_done()
322 static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) in ah6_output() argument
343 ahp = x->data; in ah6_output()
356 if (x->props.flags & XFRM_STATE_ESN) { in ah6_output()
412 ah->spi = x->id.spi; in ah6_output()
420 if (x->props.flags & XFRM_STATE_ESN) { in ah6_output()
463 struct xfrm_state *x = xfrm_input_state(skb); in ah6_input_done() local
464 struct ah_data *ahp = x->data; in ah6_input_done()
485 if (x->props.mode == XFRM_MODE_TUNNEL) in ah6_input_done()
[all …]
/net/bridge/netfilter/
Debt_limit.c26 #define _POW2_BELOW2(x) ((x)|((x)>>1)) argument
27 #define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) argument
28 #define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) argument
29 #define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) argument
30 #define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) argument
31 #define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) argument
/net/ceph/crush/
Dmapper.c76 int x, int r) in bucket_perm_choose() argument
82 if (work->perm_x != (__u32)x || work->perm_n == 0) { in bucket_perm_choose()
83 dprintk("bucket %d new x=%d\n", bucket->id, x); in bucket_perm_choose()
84 work->perm_x = x; in bucket_perm_choose()
88 s = crush_hash32_3(bucket->hash, x, bucket->id, 0) % in bucket_perm_choose()
113 i = crush_hash32_3(bucket->hash, x, bucket->id, p) % in bucket_perm_choose()
130 bucket->size, x, r, pr, s); in bucket_perm_choose()
136 struct crush_work_bucket *work, int x, int r) in bucket_uniform_choose() argument
138 return bucket_perm_choose(&bucket->h, work, x, r); in bucket_uniform_choose()
143 int x, int r) in bucket_list_choose() argument
[all …]
/net/key/
Daf_key.c32 #define _X2KEY(x) ((x) == XFRM_INF ? 0 : (x)) argument
33 #define _KEY2X(x) ((x) == 0 ? XFRM_INF : (x)) argument
764 static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x, in __pfkey_xfrm_state2msg() argument
785 sockaddr_size = pfkey_sockaddr_size(x->props.family); in __pfkey_xfrm_state2msg()
799 if ((xfrm_ctx = x->security)) { in __pfkey_xfrm_state2msg()
805 if (!xfrm_addr_equal(&x->sel.saddr, &x->props.saddr, x->props.family)) in __pfkey_xfrm_state2msg()
809 if (x->aalg && x->aalg->alg_key_len) { in __pfkey_xfrm_state2msg()
811 PFKEY_ALIGN8((x->aalg->alg_key_len + 7) / 8); in __pfkey_xfrm_state2msg()
814 if (x->ealg && x->ealg->alg_key_len) { in __pfkey_xfrm_state2msg()
816 PFKEY_ALIGN8((x->ealg->alg_key_len+7) / 8); in __pfkey_xfrm_state2msg()
[all …]
/net/netfilter/
Dxt_limit.c55 #define _POW2_BELOW2(x) ((x)|((x)>>1)) argument
56 #define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) argument
57 #define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) argument
58 #define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) argument
59 #define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) argument
60 #define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) argument
Dxt_policy.c35 match_xfrm_state(const struct xfrm_state *x, const struct xt_policy_elem *e, in match_xfrm_state() argument
38 #define MATCH_ADDR(x,y,z) (!e->match.x || \ in match_xfrm_state() argument
39 (xt_addr_cmp(&e->x, &e->y, (const union nf_inet_addr *)(z), family) \ in match_xfrm_state()
40 ^ e->invert.x)) in match_xfrm_state()
41 #define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x)) in match_xfrm_state() argument
43 return MATCH_ADDR(saddr, smask, &x->props.saddr) && in match_xfrm_state()
44 MATCH_ADDR(daddr, dmask, &x->id.daddr) && in match_xfrm_state()
45 MATCH(proto, x->id.proto) && in match_xfrm_state()
46 MATCH(mode, x->props.mode) && in match_xfrm_state()
47 MATCH(spi, x->id.spi) && in match_xfrm_state()
[all …]
/net/mac80211/
Dmesh_hwmp.c39 #define AE_F_SET(x) (*x & AE_F) argument
40 #define PREQ_IE_FLAGS(x) (*(x)) argument
41 #define PREQ_IE_HOPCOUNT(x) (*(x + 1)) argument
42 #define PREQ_IE_TTL(x) (*(x + 2)) argument
43 #define PREQ_IE_PREQ_ID(x) u32_field_get(x, 3, 0) argument
44 #define PREQ_IE_ORIG_ADDR(x) (x + 7) argument
45 #define PREQ_IE_ORIG_SN(x) u32_field_get(x, 13, 0) argument
46 #define PREQ_IE_LIFETIME(x) u32_field_get(x, 17, AE_F_SET(x)) argument
47 #define PREQ_IE_METRIC(x) u32_field_get(x, 21, AE_F_SET(x)) argument
48 #define PREQ_IE_TARGET_F(x) (*(AE_F_SET(x) ? x + 32 : x + 26)) argument
[all …]
/net/netfilter/ipset/
Dip_set_bitmap_gen.h121 void *x = get_ext(set, map, e->id); in mtype_test() local
126 return ip_set_match_extensions(set, ext, mext, flags, x); in mtype_test()
135 void *x = get_ext(set, map, e->id); in mtype_add() local
140 ip_set_timeout_expired(ext_timeout(x, set))) { in mtype_add()
148 ip_set_ext_destroy(set, x); in mtype_add()
155 mtype_add_timeout(ext_timeout(x, set), e, ext, set, map, ret); in mtype_add()
157 ip_set_timeout_set(ext_timeout(x, set), ext->timeout); in mtype_add()
161 ip_set_init_counter(ext_counter(x, set), ext); in mtype_add()
163 ip_set_init_comment(set, ext_comment(x, set), ext); in mtype_add()
165 ip_set_init_skbinfo(ext_skbinfo(x, set), ext); in mtype_add()
[all …]
/net/sched/
Dsch_sfq.c203 static inline void sfq_link(struct sfq_sched_data *q, sfq_index x) in sfq_link() argument
206 struct sfq_slot *slot = &q->slots[x]; in sfq_link()
215 q->dep[qlen].next = x; /* sfq_dep_head(q, p)->next = x */ in sfq_link()
216 sfq_dep_head(q, n)->prev = x; in sfq_link()
219 #define sfq_unlink(q, x, n, p) \ argument
221 n = q->slots[x].dep.next; \
222 p = q->slots[x].dep.prev; \
228 static inline void sfq_dec(struct sfq_sched_data *q, sfq_index x) in sfq_dec() argument
233 sfq_unlink(q, x, n, p); in sfq_dec()
235 d = q->slots[x].qlen--; in sfq_dec()
[all …]

1234