Home
last modified time | relevance | path

Searched refs:regs (Results 1 – 25 of 55) sorted by relevance

123

/net/netfilter/
Dnf_tables_core.c60 struct nft_regs *regs) in nft_bitwise_fast_eval() argument
63 u32 *src = &regs->data[priv->sreg]; in nft_bitwise_fast_eval()
64 u32 *dst = &regs->data[priv->dreg]; in nft_bitwise_fast_eval()
70 struct nft_regs *regs) in nft_cmp_fast_eval() argument
74 if (((regs->data[priv->sreg] & priv->mask) == priv->data) ^ priv->inv) in nft_cmp_fast_eval()
76 regs->verdict.code = NFT_BREAK; in nft_cmp_fast_eval()
80 struct nft_regs *regs) in nft_cmp16_fast_eval() argument
83 const u64 *reg_data = (const u64 *)&regs->data[priv->sreg]; in nft_cmp16_fast_eval()
90 regs->verdict.code = NFT_BREAK; in nft_cmp16_fast_eval()
95 const struct nft_regs *regs) in __nft_trace_verdict() argument
[all …]
Dnft_synproxy.c45 struct nft_regs *regs, in nft_synproxy_eval_v4() argument
61 regs->verdict.code = NF_STOLEN; in nft_synproxy_eval_v4()
67 regs->verdict.code = NF_STOLEN; in nft_synproxy_eval_v4()
69 regs->verdict.code = NF_DROP; in nft_synproxy_eval_v4()
76 struct nft_regs *regs, in nft_synproxy_eval_v6() argument
92 regs->verdict.code = NF_STOLEN; in nft_synproxy_eval_v6()
98 regs->verdict.code = NF_STOLEN; in nft_synproxy_eval_v6()
100 regs->verdict.code = NF_DROP; in nft_synproxy_eval_v6()
107 struct nft_regs *regs, in nft_synproxy_do_eval() argument
117 regs->verdict.code = NFT_BREAK; in nft_synproxy_do_eval()
[all …]
Dnft_xfrm.c119 struct nft_regs *regs, in nft_xfrm_state_get_key() argument
122 u32 *dest = &regs->data[priv->dreg]; in nft_xfrm_state_get_key()
127 regs->verdict.code = NFT_BREAK; in nft_xfrm_state_get_key()
156 regs->verdict.code = NFT_BREAK; in nft_xfrm_state_get_key()
160 struct nft_regs *regs, in nft_xfrm_get_eval_in() argument
167 regs->verdict.code = NFT_BREAK; in nft_xfrm_get_eval_in()
172 nft_xfrm_state_get_key(priv, regs, state); in nft_xfrm_get_eval_in()
176 struct nft_regs *regs, in nft_xfrm_get_eval_out() argument
187 nft_xfrm_state_get_key(priv, regs, dst->xfrm); in nft_xfrm_get_eval_out()
191 regs->verdict.code = NFT_BREAK; in nft_xfrm_get_eval_out()
[all …]
Dnft_bitwise.c64 struct nft_regs *regs, const struct nft_pktinfo *pkt) in nft_bitwise_eval() argument
67 const u32 *src = &regs->data[priv->sreg]; in nft_bitwise_eval()
68 u32 *dst = &regs->data[priv->dreg]; in nft_bitwise_eval()
269 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_bitwise_offload()
292 if (!track->regs[priv->sreg].selector) in nft_bitwise_reduce()
295 bitwise = nft_expr_priv(track->regs[priv->dreg].selector); in nft_bitwise_reduce()
296 if (track->regs[priv->sreg].selector == track->regs[priv->dreg].selector && in nft_bitwise_reduce()
297 track->regs[priv->sreg].num_reg == 0 && in nft_bitwise_reduce()
298 track->regs[priv->dreg].bitwise && in nft_bitwise_reduce()
299 track->regs[priv->dreg].bitwise->ops == expr->ops && in nft_bitwise_reduce()
[all …]
Dnft_tproxy.c22 struct nft_regs *regs, in nft_tproxy_eval_v4() argument
35 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v4()
41 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v4()
55 taddr = nft_reg_load_be32(&regs->data[priv->sreg_addr]); in nft_tproxy_eval_v4()
59 tport = nft_reg_load_be16(&regs->data[priv->sreg_port]); in nft_tproxy_eval_v4()
80 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v4()
85 struct nft_regs *regs, in nft_tproxy_eval_v6() argument
102 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v6()
109 regs->verdict.code = NFT_BREAK; in nft_tproxy_eval_v6()
123 memcpy(&taddr, &regs->data[priv->sreg_addr], sizeof(taddr)); in nft_tproxy_eval_v6()
[all …]
Dnft_socket.c20 struct nft_regs *regs, struct sock *sk, in nft_socket_wildcard() argument
33 regs->verdict.code = NFT_BREAK; in nft_socket_wildcard()
85 struct nft_regs *regs, in nft_socket_eval() argument
91 u32 *dest = &regs->data[priv->dreg]; in nft_socket_eval()
100 regs->verdict.code = NFT_BREAK; in nft_socket_eval()
112 regs->verdict.code = NFT_BREAK; in nft_socket_eval()
118 regs->verdict.code = NFT_BREAK; in nft_socket_eval()
121 nft_socket_wildcard(pkt, regs, sk, dest); in nft_socket_eval()
126 regs->verdict.code = NFT_BREAK; in nft_socket_eval()
133 regs->verdict.code = NFT_BREAK; in nft_socket_eval()
[all …]
Dnft_nat.c34 const struct nft_regs *regs, in nft_nat_setup_addr() argument
40 regs->data[priv->sreg_addr_min]; in nft_nat_setup_addr()
42 regs->data[priv->sreg_addr_max]; in nft_nat_setup_addr()
45 memcpy(range->min_addr.ip6, &regs->data[priv->sreg_addr_min], in nft_nat_setup_addr()
47 memcpy(range->max_addr.ip6, &regs->data[priv->sreg_addr_max], in nft_nat_setup_addr()
54 const struct nft_regs *regs, in nft_nat_setup_proto() argument
58 nft_reg_load16(&regs->data[priv->sreg_proto_min]); in nft_nat_setup_proto()
60 nft_reg_load16(&regs->data[priv->sreg_proto_max]); in nft_nat_setup_proto()
104 struct nft_regs *regs, in nft_nat_eval() argument
115 nft_nat_setup_addr(&range, regs, priv); in nft_nat_eval()
[all …]
Dnft_masq.c99 struct nft_regs *regs, in nft_masq_ipv4_eval() argument
109 &regs->data[priv->sreg_proto_min]); in nft_masq_ipv4_eval()
111 &regs->data[priv->sreg_proto_max]); in nft_masq_ipv4_eval()
113 regs->verdict.code = nf_nat_masquerade_ipv4(pkt->skb, nft_hook(pkt), in nft_masq_ipv4_eval()
146 struct nft_regs *regs, in nft_masq_ipv6_eval() argument
156 &regs->data[priv->sreg_proto_min]); in nft_masq_ipv6_eval()
158 &regs->data[priv->sreg_proto_max]); in nft_masq_ipv6_eval()
160 regs->verdict.code = nf_nat_masquerade_ipv6(pkt->skb, &range, in nft_masq_ipv6_eval()
207 struct nft_regs *regs, in nft_masq_inet_eval() argument
212 return nft_masq_ipv4_eval(expr, regs, pkt); in nft_masq_inet_eval()
[all …]
Dnft_fib_inet.c15 struct nft_regs *regs, in nft_fib_inet_eval() argument
25 return nft_fib4_eval(expr, regs, pkt); in nft_fib_inet_eval()
27 return nft_fib4_eval_type(expr, regs, pkt); in nft_fib_inet_eval()
34 return nft_fib6_eval(expr, regs, pkt); in nft_fib_inet_eval()
36 return nft_fib6_eval_type(expr, regs, pkt); in nft_fib_inet_eval()
41 regs->verdict.code = NF_DROP; in nft_fib_inet_eval()
Dnft_fib_netdev.c22 struct nft_regs *regs, in nft_fib_netdev_eval() argument
32 return nft_fib4_eval(expr, regs, pkt); in nft_fib_netdev_eval()
34 return nft_fib4_eval_type(expr, regs, pkt); in nft_fib_netdev_eval()
43 return nft_fib6_eval(expr, regs, pkt); in nft_fib_netdev_eval()
45 return nft_fib6_eval_type(expr, regs, pkt); in nft_fib_netdev_eval()
50 regs->verdict.code = NFT_BREAK; in nft_fib_netdev_eval()
Dnft_exthdr.c48 struct nft_regs *regs, in nft_exthdr_ipv6_eval() argument
52 u32 *dest = &regs->data[priv->dreg]; in nft_exthdr_ipv6_eval()
72 regs->verdict.code = NFT_BREAK; in nft_exthdr_ipv6_eval()
143 struct nft_regs *regs, in nft_exthdr_ipv4_eval() argument
147 u32 *dest = &regs->data[priv->dreg]; in nft_exthdr_ipv4_eval()
168 regs->verdict.code = NFT_BREAK; in nft_exthdr_ipv4_eval()
192 struct nft_regs *regs, in nft_exthdr_tcp_eval() argument
198 u32 *dest = &regs->data[priv->dreg]; in nft_exthdr_tcp_eval()
232 regs->verdict.code = NFT_BREAK; in nft_exthdr_tcp_eval()
236 struct nft_regs *regs, in nft_exthdr_tcp_set_eval() argument
[all …]
Dnft_osf.c20 static void nft_osf_eval(const struct nft_expr *expr, struct nft_regs *regs, in nft_osf_eval() argument
24 u32 *dest = &regs->data[priv->dreg]; in nft_osf_eval()
32 regs->verdict.code = NFT_BREAK; in nft_osf_eval()
39 regs->verdict.code = NFT_BREAK; in nft_osf_eval()
43 regs->verdict.code = NFT_BREAK; in nft_osf_eval()
146 osf = nft_expr_priv(track->regs[priv->dreg].selector); in nft_osf_reduce()
153 if (!track->regs[priv->dreg].bitwise) in nft_osf_reduce()
Dnft_fwd_netdev.c25 struct nft_regs *regs, in nft_fwd_netdev_eval() argument
29 int oif = regs->data[priv->sreg_dev]; in nft_fwd_netdev_eval()
37 regs->verdict.code = NF_STOLEN; in nft_fwd_netdev_eval()
77 int oif = ctx->regs[priv->sreg_dev].data.data[0]; in nft_fwd_netdev_offload()
94 struct nft_regs *regs, in nft_fwd_neigh_eval() argument
98 void *addr = &regs->data[priv->sreg_addr]; in nft_fwd_neigh_eval()
99 int oif = regs->data[priv->sreg_dev]; in nft_fwd_neigh_eval()
151 regs->verdict.code = verdict; in nft_fwd_neigh_eval()
Dnft_ct.c61 struct nft_regs *regs, in nft_ct_get_eval() argument
65 u32 *dest = &regs->data[priv->dreg]; in nft_ct_get_eval()
229 regs->verdict.code = NFT_BREAK; in nft_ct_get_eval()
234 struct nft_regs *regs, in nft_ct_set_zone_eval() argument
241 u16 value = nft_reg_load16(&regs->data[priv->sreg]); in nft_ct_set_zone_eval()
272 regs->verdict.code = NF_DROP; in nft_ct_set_zone_eval()
282 struct nft_regs *regs, in nft_ct_set_eval() argument
288 u32 value = regs->data[priv->sreg]; in nft_ct_set_eval()
317 &regs->data[priv->sreg], in nft_ct_set_eval()
318 &regs->data[priv->sreg], in nft_ct_set_eval()
[all …]
Dnft_connlimit.c23 struct nft_regs *regs, in nft_connlimit_do_eval() argument
42 regs->verdict.code = NF_DROP; in nft_connlimit_do_eval()
47 regs->verdict.code = NF_DROP; in nft_connlimit_do_eval()
54 regs->verdict.code = NFT_BREAK; in nft_connlimit_do_eval()
123 struct nft_regs *regs, in nft_connlimit_obj_eval() argument
128 nft_connlimit_do_eval(priv, regs, pkt, NULL); in nft_connlimit_obj_eval()
180 struct nft_regs *regs, in nft_connlimit_eval() argument
185 nft_connlimit_do_eval(priv, regs, pkt, NULL); in nft_connlimit_eval()
Dnft_payload.c122 struct nft_regs *regs, in nft_payload_eval() argument
127 u32 *dest = &regs->data[priv->dreg]; in nft_payload_eval()
169 regs->verdict.code = NFT_BREAK; in nft_payload_eval()
224 payload = nft_expr_priv(track->regs[priv->dreg].selector); in nft_payload_reduce()
232 if (!track->regs[priv->dreg].bitwise) in nft_payload_reduce()
270 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_payload_offload_ll()
339 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_payload_offload_ip()
379 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_payload_offload_ip6()
439 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_payload_offload_tcp()
467 struct nft_offload_reg *reg = &ctx->regs[priv->dreg]; in nft_payload_offload_udp()
[all …]
Dnft_dynset.c48 struct nft_regs *regs) in nft_dynset_new() argument
60 &regs->data[priv->sreg_key], NULL, in nft_dynset_new()
61 &regs->data[priv->sreg_data], in nft_dynset_new()
81 struct nft_regs *regs, const struct nft_pktinfo *pkt) in nft_dynset_eval() argument
89 set->ops->delete(set, &regs->data[priv->sreg_key]); in nft_dynset_eval()
93 if (set->ops->update(set, &regs->data[priv->sreg_key], nft_dynset_new, in nft_dynset_eval()
94 expr, regs, &ext)) { in nft_dynset_eval()
101 nft_set_elem_update_expr(ext, regs, pkt); in nft_dynset_eval()
104 regs->verdict.code = NFT_BREAK; in nft_dynset_eval()
109 regs->verdict.code = NFT_BREAK; in nft_dynset_eval()
Dnft_hash.c27 struct nft_regs *regs, in nft_jhash_eval() argument
31 const void *data = &regs->data[priv->sreg]; in nft_jhash_eval()
37 regs->data[priv->dreg] = h + priv->offset; in nft_jhash_eval()
47 struct nft_regs *regs, in nft_symhash_eval() argument
56 regs->data[priv->dreg] = h + priv->offset; in nft_symhash_eval()
209 symhash = nft_expr_priv(track->regs[priv->dreg].selector); in nft_symhash_reduce()
216 if (!track->regs[priv->dreg].bitwise) in nft_symhash_reduce()
Dnft_range.c24 struct nft_regs *regs, const struct nft_pktinfo *pkt) in nft_range_eval() argument
29 d1 = memcmp(&regs->data[priv->sreg], &priv->data_from, priv->len); in nft_range_eval()
30 d2 = memcmp(&regs->data[priv->sreg], &priv->data_to, priv->len); in nft_range_eval()
34 regs->verdict.code = NFT_BREAK; in nft_range_eval()
38 regs->verdict.code = NFT_BREAK; in nft_range_eval()
Dnft_compat.c74 struct nft_regs *regs, in nft_target_eval_xt() argument
92 regs->verdict.code = NFT_CONTINUE; in nft_target_eval_xt()
95 regs->verdict.code = ret; in nft_target_eval_xt()
101 struct nft_regs *regs, in nft_target_eval_bridge() argument
119 regs->verdict.code = NF_ACCEPT; in nft_target_eval_bridge()
122 regs->verdict.code = NF_DROP; in nft_target_eval_bridge()
125 regs->verdict.code = NFT_CONTINUE; in nft_target_eval_bridge()
128 regs->verdict.code = NFT_RETURN; in nft_target_eval_bridge()
131 regs->verdict.code = ret; in nft_target_eval_bridge()
382 struct nft_regs *regs, in __nft_match_eval() argument
[all …]
Dnft_objref.c17 struct nft_regs *regs, in nft_objref_eval() argument
22 obj->ops->eval(obj, regs, pkt); in nft_objref_eval()
106 struct nft_regs *regs, in nft_objref_map_eval() argument
116 found = nft_set_do_lookup(net, set, &regs->data[priv->sreg], &ext); in nft_objref_map_eval()
120 regs->verdict.code = NFT_BREAK; in nft_objref_map_eval()
125 obj->ops->eval(obj, regs, pkt); in nft_objref_map_eval()
Dnft_quota.c34 struct nft_regs *regs, in nft_quota_do_eval() argument
38 regs->verdict.code = NFT_BREAK; in nft_quota_do_eval()
50 struct nft_regs *regs, in nft_quota_obj_eval() argument
58 regs->verdict.code = NFT_BREAK; in nft_quota_obj_eval()
203 struct nft_regs *regs, in nft_quota_eval() argument
208 nft_quota_do_eval(priv, regs, pkt); in nft_quota_eval()
/net/bridge/netfilter/
Dnft_meta_bridge.c22 struct nft_regs *regs, in nft_meta_bridge_get_eval() argument
27 u32 *dest = &regs->data[priv->dreg]; in nft_meta_bridge_get_eval()
60 return nft_meta_get_eval(expr, regs, pkt); in nft_meta_bridge_get_eval()
66 regs->verdict.code = NFT_BREAK; in nft_meta_bridge_get_eval()
111 if (!track->regs[i].selector) in nft_meta_bridge_set_reduce()
114 if (track->regs[i].selector->ops != &nft_meta_bridge_get_ops) in nft_meta_bridge_set_reduce()
/net/ipv4/netfilter/
Dnft_fib_ipv4.c27 void nft_fib4_eval_type(const struct nft_expr *expr, struct nft_regs *regs, in nft_fib4_eval_type() argument
32 u32 *dst = &regs->data[priv->dreg]; in nft_fib4_eval_type()
44 regs->verdict.code = NFT_BREAK; in nft_fib4_eval_type()
57 void nft_fib4_eval(const struct nft_expr *expr, struct nft_regs *regs, in nft_fib4_eval() argument
62 u32 *dest = &regs->data[priv->dreg]; in nft_fib4_eval()
98 regs->verdict.code = NFT_BREAK; in nft_fib4_eval()
/net/ipv6/netfilter/
Dnft_fib_ipv6.c127 void nft_fib6_eval_type(const struct nft_expr *expr, struct nft_regs *regs, in nft_fib6_eval_type() argument
132 u32 *dest = &regs->data[priv->dreg]; in nft_fib6_eval_type()
137 regs->verdict.code = NFT_BREAK; in nft_fib6_eval_type()
156 void nft_fib6_eval(const struct nft_expr *expr, struct nft_regs *regs, in nft_fib6_eval() argument
162 u32 *dest = &regs->data[priv->dreg]; in nft_fib6_eval()
179 regs->verdict.code = NFT_BREAK; in nft_fib6_eval()

123