Lines Matching full:match

30 		struct flow_match_vlan match;  in nfp_flower_compile_tci()  local
32 flow_rule_match_vlan(rule, &match); in nfp_flower_compile_tci()
36 match.key->vlan_priority) | in nfp_flower_compile_tci()
38 match.key->vlan_id); in nfp_flower_compile_tci()
42 match.mask->vlan_priority) | in nfp_flower_compile_tci()
44 match.mask->vlan_id); in nfp_flower_compile_tci()
85 NL_SET_ERR_MSG_MOD(extack, "unsupported offload: invalid ingress interface for match offload"); in nfp_flower_compile_port()
100 struct flow_match_eth_addrs match; in nfp_flower_compile_mac() local
103 flow_rule_match_eth_addrs(rule, &match); in nfp_flower_compile_mac()
106 ext->mac_dst[i] |= match.key->dst[i] & in nfp_flower_compile_mac()
107 match.mask->dst[i]; in nfp_flower_compile_mac()
108 msk->mac_dst[i] |= match.mask->dst[i]; in nfp_flower_compile_mac()
109 ext->mac_src[i] |= match.key->src[i] & in nfp_flower_compile_mac()
110 match.mask->src[i]; in nfp_flower_compile_mac()
111 msk->mac_src[i] |= match.mask->src[i]; in nfp_flower_compile_mac()
123 struct flow_match_mpls match; in nfp_flower_compile_mpls() local
126 flow_rule_match_mpls(rule, &match); in nfp_flower_compile_mpls()
129 if (match.mask->used_lses != 1) { in nfp_flower_compile_mpls()
131 "unsupported offload: invalid LSE depth for MPLS match offload"); in nfp_flower_compile_mpls()
136 match.key->ls[0].mpls_label) | in nfp_flower_compile_mpls()
138 match.key->ls[0].mpls_tc) | in nfp_flower_compile_mpls()
140 match.key->ls[0].mpls_bos) | in nfp_flower_compile_mpls()
144 match.mask->ls[0].mpls_label) | in nfp_flower_compile_mpls()
146 match.mask->ls[0].mpls_tc) | in nfp_flower_compile_mpls()
148 match.mask->ls[0].mpls_bos) | in nfp_flower_compile_mpls()
158 struct flow_match_basic match; in nfp_flower_compile_mpls() local
160 flow_rule_match_basic(rule, &match); in nfp_flower_compile_mpls()
161 if (match.key->n_proto == cpu_to_be16(ETH_P_MPLS_UC) || in nfp_flower_compile_mpls()
162 match.key->n_proto == cpu_to_be16(ETH_P_MPLS_MC)) { in nfp_flower_compile_mpls()
191 struct flow_match_ports match; in nfp_flower_compile_tport() local
193 flow_rule_match_ports(rule, &match); in nfp_flower_compile_tport()
194 ext->port_src |= match.key->src & match.mask->src; in nfp_flower_compile_tport()
195 ext->port_dst |= match.key->dst & match.mask->dst; in nfp_flower_compile_tport()
196 msk->port_src |= match.mask->src; in nfp_flower_compile_tport()
197 msk->port_dst |= match.mask->dst; in nfp_flower_compile_tport()
206 struct flow_match_basic match; in nfp_flower_compile_ip_ext() local
208 flow_rule_match_basic(rule, &match); in nfp_flower_compile_ip_ext()
209 ext->proto |= match.key->ip_proto & match.mask->ip_proto; in nfp_flower_compile_ip_ext()
210 msk->proto |= match.mask->ip_proto; in nfp_flower_compile_ip_ext()
214 struct flow_match_ip match; in nfp_flower_compile_ip_ext() local
216 flow_rule_match_ip(rule, &match); in nfp_flower_compile_ip_ext()
217 ext->tos |= match.key->tos & match.mask->tos; in nfp_flower_compile_ip_ext()
218 ext->ttl |= match.key->ttl & match.mask->ttl; in nfp_flower_compile_ip_ext()
219 msk->tos |= match.mask->tos; in nfp_flower_compile_ip_ext()
220 msk->ttl |= match.mask->ttl; in nfp_flower_compile_ip_ext()
225 struct flow_match_tcp match; in nfp_flower_compile_ip_ext() local
227 flow_rule_match_tcp(rule, &match); in nfp_flower_compile_ip_ext()
228 tcp_flags = be16_to_cpu(match.key->flags); in nfp_flower_compile_ip_ext()
229 tcp_flags_mask = be16_to_cpu(match.mask->flags); in nfp_flower_compile_ip_ext()
258 struct flow_match_control match; in nfp_flower_compile_ip_ext() local
260 flow_rule_match_control(rule, &match); in nfp_flower_compile_ip_ext()
261 if (match.key->flags & FLOW_DIS_IS_FRAGMENT) in nfp_flower_compile_ip_ext()
263 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) in nfp_flower_compile_ip_ext()
265 if (match.key->flags & FLOW_DIS_FIRST_FRAG) in nfp_flower_compile_ip_ext()
267 if (match.mask->flags & FLOW_DIS_FIRST_FRAG) in nfp_flower_compile_ip_ext()
273 nfp_flower_fill_vlan(struct flow_match_vlan *match, in nfp_flower_fill_vlan() argument
277 struct flow_dissector_key_vlan *mask = match->mask; in nfp_flower_fill_vlan()
278 struct flow_dissector_key_vlan *key = match->key; in nfp_flower_fill_vlan()
310 struct flow_match_vlan match; in nfp_flower_compile_vlan() local
313 flow_rule_match_vlan(rule, &match); in nfp_flower_compile_vlan()
314 nfp_flower_fill_vlan(&match, ext, msk, true); in nfp_flower_compile_vlan()
317 flow_rule_match_cvlan(rule, &match); in nfp_flower_compile_vlan()
318 nfp_flower_fill_vlan(&match, ext, msk, false); in nfp_flower_compile_vlan()
327 struct flow_match_ipv4_addrs match; in nfp_flower_compile_ipv4() local
329 flow_rule_match_ipv4_addrs(rule, &match); in nfp_flower_compile_ipv4()
330 ext->ipv4_src |= match.key->src & match.mask->src; in nfp_flower_compile_ipv4()
331 ext->ipv4_dst |= match.key->dst & match.mask->dst; in nfp_flower_compile_ipv4()
332 msk->ipv4_src |= match.mask->src; in nfp_flower_compile_ipv4()
333 msk->ipv4_dst |= match.mask->dst; in nfp_flower_compile_ipv4()
344 struct flow_match_ipv6_addrs match; in nfp_flower_compile_ipv6() local
347 flow_rule_match_ipv6_addrs(rule, &match); in nfp_flower_compile_ipv6()
349 ext->ipv6_src.s6_addr[i] |= match.key->src.s6_addr[i] & in nfp_flower_compile_ipv6()
350 match.mask->src.s6_addr[i]; in nfp_flower_compile_ipv6()
351 ext->ipv6_dst.s6_addr[i] |= match.key->dst.s6_addr[i] & in nfp_flower_compile_ipv6()
352 match.mask->dst.s6_addr[i]; in nfp_flower_compile_ipv6()
353 msk->ipv6_src.s6_addr[i] |= match.mask->src.s6_addr[i]; in nfp_flower_compile_ipv6()
354 msk->ipv6_dst.s6_addr[i] |= match.mask->dst.s6_addr[i]; in nfp_flower_compile_ipv6()
364 struct flow_match_enc_opts match; in nfp_flower_compile_geneve_opt() local
368 flow_rule_match_enc_opts(rule, &match); in nfp_flower_compile_geneve_opt()
370 for (i = 0; i < match.mask->len; i++) { in nfp_flower_compile_geneve_opt()
371 ext[i] |= match.key->data[i] & match.mask->data[i]; in nfp_flower_compile_geneve_opt()
372 msk[i] |= match.mask->data[i]; in nfp_flower_compile_geneve_opt()
383 struct flow_match_ipv4_addrs match; in nfp_flower_compile_tun_ipv4_addrs() local
385 flow_rule_match_enc_ipv4_addrs(rule, &match); in nfp_flower_compile_tun_ipv4_addrs()
386 ext->src |= match.key->src & match.mask->src; in nfp_flower_compile_tun_ipv4_addrs()
387 ext->dst |= match.key->dst & match.mask->dst; in nfp_flower_compile_tun_ipv4_addrs()
388 msk->src |= match.mask->src; in nfp_flower_compile_tun_ipv4_addrs()
389 msk->dst |= match.mask->dst; in nfp_flower_compile_tun_ipv4_addrs()
399 struct flow_match_ipv6_addrs match; in nfp_flower_compile_tun_ipv6_addrs() local
402 flow_rule_match_enc_ipv6_addrs(rule, &match); in nfp_flower_compile_tun_ipv6_addrs()
404 ext->src.s6_addr[i] |= match.key->src.s6_addr[i] & in nfp_flower_compile_tun_ipv6_addrs()
405 match.mask->src.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
406 ext->dst.s6_addr[i] |= match.key->dst.s6_addr[i] & in nfp_flower_compile_tun_ipv6_addrs()
407 match.mask->dst.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
408 msk->src.s6_addr[i] |= match.mask->src.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
409 msk->dst.s6_addr[i] |= match.mask->dst.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
420 struct flow_match_ip match; in nfp_flower_compile_tun_ip_ext() local
422 flow_rule_match_enc_ip(rule, &match); in nfp_flower_compile_tun_ip_ext()
423 ext->tos |= match.key->tos & match.mask->tos; in nfp_flower_compile_tun_ip_ext()
424 ext->ttl |= match.key->ttl & match.mask->ttl; in nfp_flower_compile_tun_ip_ext()
425 msk->tos |= match.mask->tos; in nfp_flower_compile_tun_ip_ext()
426 msk->ttl |= match.mask->ttl; in nfp_flower_compile_tun_ip_ext()
435 struct flow_match_enc_keyid match; in nfp_flower_compile_tun_udp_key() local
438 flow_rule_match_enc_keyid(rule, &match); in nfp_flower_compile_tun_udp_key()
439 vni = be32_to_cpu((match.key->keyid & match.mask->keyid)) << in nfp_flower_compile_tun_udp_key()
442 vni = be32_to_cpu(match.mask->keyid) << NFP_FL_TUN_VNI_OFFSET; in nfp_flower_compile_tun_udp_key()
452 struct flow_match_enc_keyid match; in nfp_flower_compile_tun_gre_key() local
454 flow_rule_match_enc_keyid(rule, &match); in nfp_flower_compile_tun_gre_key()
455 *key |= match.key->keyid & match.mask->keyid; in nfp_flower_compile_tun_gre_key()
456 *key_msk |= match.mask->keyid; in nfp_flower_compile_tun_gre_key()
633 * This must be present and be an exact match. in nfp_flower_compile_flow_match()
677 * This must be present and be an exact match. in nfp_flower_compile_flow_match()