Lines Matching refs: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()
100 struct flow_match_eth_addrs match; in nfp_flower_compile_mac() local
104 flow_rule_match_eth_addrs(rule, &match); in nfp_flower_compile_mac()
107 tmp = match.key->dst[i] & match.mask->dst[i]; in nfp_flower_compile_mac()
109 msk->mac_dst[i] |= match.mask->dst[i]; in nfp_flower_compile_mac()
111 tmp = match.key->src[i] & match.mask->src[i]; in nfp_flower_compile_mac()
113 msk->mac_src[i] |= match.mask->src[i]; in nfp_flower_compile_mac()
125 struct flow_match_mpls match; in nfp_flower_compile_mpls() local
128 flow_rule_match_mpls(rule, &match); in nfp_flower_compile_mpls()
131 if (match.mask->used_lses != 1) { in nfp_flower_compile_mpls()
138 match.key->ls[0].mpls_label) | in nfp_flower_compile_mpls()
140 match.key->ls[0].mpls_tc) | in nfp_flower_compile_mpls()
142 match.key->ls[0].mpls_bos) | in nfp_flower_compile_mpls()
146 match.mask->ls[0].mpls_label) | in nfp_flower_compile_mpls()
148 match.mask->ls[0].mpls_tc) | in nfp_flower_compile_mpls()
150 match.mask->ls[0].mpls_bos) | in nfp_flower_compile_mpls()
160 struct flow_match_basic match; in nfp_flower_compile_mpls() local
162 flow_rule_match_basic(rule, &match); in nfp_flower_compile_mpls()
163 if (match.key->n_proto == cpu_to_be16(ETH_P_MPLS_UC) || in nfp_flower_compile_mpls()
164 match.key->n_proto == cpu_to_be16(ETH_P_MPLS_MC)) { in nfp_flower_compile_mpls()
193 struct flow_match_ports match; in nfp_flower_compile_tport() local
196 flow_rule_match_ports(rule, &match); in nfp_flower_compile_tport()
198 tmp = match.key->src & match.mask->src; in nfp_flower_compile_tport()
200 msk->port_src |= match.mask->src; in nfp_flower_compile_tport()
202 tmp = match.key->dst & match.mask->dst; in nfp_flower_compile_tport()
204 msk->port_dst |= match.mask->dst; in nfp_flower_compile_tport()
213 struct flow_match_basic match; in nfp_flower_compile_ip_ext() local
215 flow_rule_match_basic(rule, &match); in nfp_flower_compile_ip_ext()
216 ext->proto |= match.key->ip_proto & match.mask->ip_proto; in nfp_flower_compile_ip_ext()
217 msk->proto |= match.mask->ip_proto; in nfp_flower_compile_ip_ext()
221 struct flow_match_ip match; in nfp_flower_compile_ip_ext() local
224 flow_rule_match_ip(rule, &match); in nfp_flower_compile_ip_ext()
226 tmp = match.key->tos & match.mask->tos; in nfp_flower_compile_ip_ext()
228 msk->tos |= match.mask->tos; in nfp_flower_compile_ip_ext()
230 tmp = match.key->ttl & match.mask->ttl; in nfp_flower_compile_ip_ext()
232 msk->ttl |= match.mask->ttl; in nfp_flower_compile_ip_ext()
237 struct flow_match_tcp match; in nfp_flower_compile_ip_ext() local
239 flow_rule_match_tcp(rule, &match); in nfp_flower_compile_ip_ext()
240 tcp_flags = be16_to_cpu(match.key->flags); in nfp_flower_compile_ip_ext()
241 tcp_flags_mask = be16_to_cpu(match.mask->flags); in nfp_flower_compile_ip_ext()
270 struct flow_match_control match; in nfp_flower_compile_ip_ext() local
272 flow_rule_match_control(rule, &match); in nfp_flower_compile_ip_ext()
273 if (match.key->flags & FLOW_DIS_IS_FRAGMENT) in nfp_flower_compile_ip_ext()
275 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) in nfp_flower_compile_ip_ext()
277 if (match.key->flags & FLOW_DIS_FIRST_FRAG) in nfp_flower_compile_ip_ext()
279 if (match.mask->flags & FLOW_DIS_FIRST_FRAG) in nfp_flower_compile_ip_ext()
285 nfp_flower_fill_vlan(struct flow_match_vlan *match, in nfp_flower_fill_vlan() argument
289 struct flow_dissector_key_vlan *mask = match->mask; in nfp_flower_fill_vlan()
290 struct flow_dissector_key_vlan *key = match->key; in nfp_flower_fill_vlan()
322 struct flow_match_vlan match; in nfp_flower_compile_vlan() local
325 flow_rule_match_vlan(rule, &match); in nfp_flower_compile_vlan()
326 nfp_flower_fill_vlan(&match, ext, msk, true); in nfp_flower_compile_vlan()
329 flow_rule_match_cvlan(rule, &match); in nfp_flower_compile_vlan()
330 nfp_flower_fill_vlan(&match, ext, msk, false); in nfp_flower_compile_vlan()
339 struct flow_match_ipv4_addrs match; in nfp_flower_compile_ipv4() local
342 flow_rule_match_ipv4_addrs(rule, &match); in nfp_flower_compile_ipv4()
344 tmp = match.key->src & match.mask->src; in nfp_flower_compile_ipv4()
346 msk->ipv4_src |= match.mask->src; in nfp_flower_compile_ipv4()
348 tmp = match.key->dst & match.mask->dst; in nfp_flower_compile_ipv4()
350 msk->ipv4_dst |= match.mask->dst; in nfp_flower_compile_ipv4()
361 struct flow_match_ipv6_addrs match; in nfp_flower_compile_ipv6() local
365 flow_rule_match_ipv6_addrs(rule, &match); in nfp_flower_compile_ipv6()
367 tmp = match.key->src.s6_addr[i] & in nfp_flower_compile_ipv6()
368 match.mask->src.s6_addr[i]; in nfp_flower_compile_ipv6()
371 msk->ipv6_src.s6_addr[i] |= match.mask->src.s6_addr[i]; in nfp_flower_compile_ipv6()
373 tmp = match.key->dst.s6_addr[i] & in nfp_flower_compile_ipv6()
374 match.mask->dst.s6_addr[i]; in nfp_flower_compile_ipv6()
377 msk->ipv6_dst.s6_addr[i] |= match.mask->dst.s6_addr[i]; in nfp_flower_compile_ipv6()
387 struct flow_match_enc_opts match; in nfp_flower_compile_geneve_opt() local
391 flow_rule_match_enc_opts(rule, &match); in nfp_flower_compile_geneve_opt()
393 for (i = 0; i < match.mask->len; i++) { in nfp_flower_compile_geneve_opt()
394 ext[i] |= match.key->data[i] & match.mask->data[i]; in nfp_flower_compile_geneve_opt()
395 msk[i] |= match.mask->data[i]; in nfp_flower_compile_geneve_opt()
406 struct flow_match_ipv4_addrs match; in nfp_flower_compile_tun_ipv4_addrs() local
408 flow_rule_match_enc_ipv4_addrs(rule, &match); in nfp_flower_compile_tun_ipv4_addrs()
409 ext->src |= match.key->src & match.mask->src; in nfp_flower_compile_tun_ipv4_addrs()
410 ext->dst |= match.key->dst & match.mask->dst; in nfp_flower_compile_tun_ipv4_addrs()
411 msk->src |= match.mask->src; in nfp_flower_compile_tun_ipv4_addrs()
412 msk->dst |= match.mask->dst; in nfp_flower_compile_tun_ipv4_addrs()
422 struct flow_match_ipv6_addrs match; in nfp_flower_compile_tun_ipv6_addrs() local
425 flow_rule_match_enc_ipv6_addrs(rule, &match); in nfp_flower_compile_tun_ipv6_addrs()
427 ext->src.s6_addr[i] |= match.key->src.s6_addr[i] & in nfp_flower_compile_tun_ipv6_addrs()
428 match.mask->src.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
429 ext->dst.s6_addr[i] |= match.key->dst.s6_addr[i] & in nfp_flower_compile_tun_ipv6_addrs()
430 match.mask->dst.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
431 msk->src.s6_addr[i] |= match.mask->src.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
432 msk->dst.s6_addr[i] |= match.mask->dst.s6_addr[i]; in nfp_flower_compile_tun_ipv6_addrs()
443 struct flow_match_ip match; in nfp_flower_compile_tun_ip_ext() local
445 flow_rule_match_enc_ip(rule, &match); in nfp_flower_compile_tun_ip_ext()
446 ext->tos |= match.key->tos & match.mask->tos; in nfp_flower_compile_tun_ip_ext()
447 ext->ttl |= match.key->ttl & match.mask->ttl; in nfp_flower_compile_tun_ip_ext()
448 msk->tos |= match.mask->tos; in nfp_flower_compile_tun_ip_ext()
449 msk->ttl |= match.mask->ttl; in nfp_flower_compile_tun_ip_ext()
458 struct flow_match_enc_keyid match; in nfp_flower_compile_tun_udp_key() local
461 flow_rule_match_enc_keyid(rule, &match); in nfp_flower_compile_tun_udp_key()
462 vni = be32_to_cpu((match.key->keyid & match.mask->keyid)) << in nfp_flower_compile_tun_udp_key()
465 vni = be32_to_cpu(match.mask->keyid) << NFP_FL_TUN_VNI_OFFSET; in nfp_flower_compile_tun_udp_key()
475 struct flow_match_enc_keyid match; in nfp_flower_compile_tun_gre_key() local
477 flow_rule_match_enc_keyid(rule, &match); in nfp_flower_compile_tun_gre_key()
478 *key |= match.key->keyid & match.mask->keyid; in nfp_flower_compile_tun_gre_key()
479 *key_msk |= match.mask->keyid; in nfp_flower_compile_tun_gre_key()