Lines Matching refs:ext

11 nfp_flower_compile_meta(struct nfp_flower_meta_tci *ext,  in nfp_flower_compile_meta()  argument
15 ext->nfp_flow_key_layer = key_type; in nfp_flower_compile_meta()
16 ext->mask_id = ~0; in nfp_flower_compile_meta()
23 nfp_flower_compile_tci(struct nfp_flower_meta_tci *ext, in nfp_flower_compile_tci() argument
46 ext->tci |= cpu_to_be16((key_tci & msk_tci)); in nfp_flower_compile_tci()
52 nfp_flower_compile_meta_tci(struct nfp_flower_meta_tci *ext, in nfp_flower_compile_meta_tci() argument
56 memset(ext, 0, sizeof(struct nfp_flower_meta_tci)); in nfp_flower_compile_meta_tci()
59 nfp_flower_compile_meta(ext, msk, key_type); in nfp_flower_compile_meta_tci()
62 nfp_flower_compile_tci(ext, msk, rule); in nfp_flower_compile_meta_tci()
95 nfp_flower_compile_mac(struct nfp_flower_mac_mpls *ext, in nfp_flower_compile_mac() argument
108 ext->mac_dst[i] |= tmp & (~msk->mac_dst[i]); in nfp_flower_compile_mac()
112 ext->mac_src[i] |= tmp & (~msk->mac_src[i]); in nfp_flower_compile_mac()
119 nfp_flower_compile_mpls(struct nfp_flower_mac_mpls *ext, in nfp_flower_compile_mpls() argument
153 ext->mpls_lse |= cpu_to_be32((key_mpls & msk_mpls)); in nfp_flower_compile_mpls()
165 ext->mpls_lse |= cpu_to_be32(NFP_FLOWER_MASK_MPLS_Q); in nfp_flower_compile_mpls()
174 nfp_flower_compile_mac_mpls(struct nfp_flower_mac_mpls *ext, in nfp_flower_compile_mac_mpls() argument
179 memset(ext, 0, sizeof(struct nfp_flower_mac_mpls)); in nfp_flower_compile_mac_mpls()
182 nfp_flower_compile_mac(ext, msk, rule); in nfp_flower_compile_mac_mpls()
184 return nfp_flower_compile_mpls(ext, msk, rule, extack); in nfp_flower_compile_mac_mpls()
188 nfp_flower_compile_tport(struct nfp_flower_tp_ports *ext, in nfp_flower_compile_tport() argument
199 ext->port_src |= tmp & (~msk->port_src); in nfp_flower_compile_tport()
203 ext->port_dst |= tmp & (~msk->port_dst); in nfp_flower_compile_tport()
209 nfp_flower_compile_ip_ext(struct nfp_flower_ip_ext *ext, in nfp_flower_compile_ip_ext() argument
216 ext->proto |= match.key->ip_proto & match.mask->ip_proto; in nfp_flower_compile_ip_ext()
227 ext->tos |= tmp & (~msk->tos); in nfp_flower_compile_ip_ext()
231 ext->ttl |= tmp & (~msk->ttl); in nfp_flower_compile_ip_ext()
244 ext->flags |= NFP_FL_TCP_FLAG_FIN; in nfp_flower_compile_ip_ext()
249 ext->flags |= NFP_FL_TCP_FLAG_SYN; in nfp_flower_compile_ip_ext()
254 ext->flags |= NFP_FL_TCP_FLAG_RST; in nfp_flower_compile_ip_ext()
259 ext->flags |= NFP_FL_TCP_FLAG_PSH; in nfp_flower_compile_ip_ext()
264 ext->flags |= NFP_FL_TCP_FLAG_URG; in nfp_flower_compile_ip_ext()
274 ext->flags |= NFP_FL_IP_FRAGMENTED; in nfp_flower_compile_ip_ext()
278 ext->flags |= NFP_FL_IP_FRAG_FIRST; in nfp_flower_compile_ip_ext()
286 struct nfp_flower_vlan *ext, in nfp_flower_fill_vlan() argument
305 ext->outer_tci |= cpu_to_be16((key_tci & msk_tci)); in nfp_flower_fill_vlan()
306 ext->outer_tpid |= key->vlan_tpid & mask->vlan_tpid; in nfp_flower_fill_vlan()
310 ext->inner_tci |= cpu_to_be16((key_tci & msk_tci)); in nfp_flower_fill_vlan()
311 ext->inner_tpid |= key->vlan_tpid & mask->vlan_tpid; in nfp_flower_fill_vlan()
318 nfp_flower_compile_vlan(struct nfp_flower_vlan *ext, in nfp_flower_compile_vlan() argument
326 nfp_flower_fill_vlan(&match, ext, msk, true); in nfp_flower_compile_vlan()
330 nfp_flower_fill_vlan(&match, ext, msk, false); in nfp_flower_compile_vlan()
335 nfp_flower_compile_ipv4(struct nfp_flower_ipv4 *ext, in nfp_flower_compile_ipv4() argument
345 ext->ipv4_src |= tmp & (~msk->ipv4_src); in nfp_flower_compile_ipv4()
349 ext->ipv4_dst |= tmp & (~msk->ipv4_dst); in nfp_flower_compile_ipv4()
353 nfp_flower_compile_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv4()
357 nfp_flower_compile_ipv6(struct nfp_flower_ipv6 *ext, in nfp_flower_compile_ipv6() argument
366 for (i = 0; i < sizeof(ext->ipv6_src); i++) { in nfp_flower_compile_ipv6()
369 ext->ipv6_src.s6_addr[i] |= tmp & in nfp_flower_compile_ipv6()
375 ext->ipv6_dst.s6_addr[i] |= tmp & in nfp_flower_compile_ipv6()
381 nfp_flower_compile_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv6()
385 nfp_flower_compile_geneve_opt(u8 *ext, u8 *msk, struct flow_rule *rule) in nfp_flower_compile_geneve_opt() argument
394 ext[i] |= match.key->data[i] & match.mask->data[i]; in nfp_flower_compile_geneve_opt()
401 nfp_flower_compile_tun_ipv4_addrs(struct nfp_flower_tun_ipv4 *ext, in nfp_flower_compile_tun_ipv4_addrs() argument
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()
417 nfp_flower_compile_tun_ipv6_addrs(struct nfp_flower_tun_ipv6 *ext, in nfp_flower_compile_tun_ipv6_addrs() argument
426 for (i = 0; i < sizeof(ext->src); i++) { 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()
429 ext->dst.s6_addr[i] |= match.key->dst.s6_addr[i] & in nfp_flower_compile_tun_ipv6_addrs()
438 nfp_flower_compile_tun_ip_ext(struct nfp_flower_tun_ip_ext *ext, in nfp_flower_compile_tun_ip_ext() argument
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()
487 nfp_flower_compile_ipv4_gre_tun(struct nfp_flower_ipv4_gre_tun *ext, in nfp_flower_compile_ipv4_gre_tun() argument
492 ext->ethertype = cpu_to_be16(ETH_P_TEB); in nfp_flower_compile_ipv4_gre_tun()
495 nfp_flower_compile_tun_ipv4_addrs(&ext->ipv4, &msk->ipv4, rule); in nfp_flower_compile_ipv4_gre_tun()
496 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv4_gre_tun()
497 nfp_flower_compile_tun_gre_key(&ext->tun_key, &msk->tun_key, in nfp_flower_compile_ipv4_gre_tun()
498 &ext->tun_flags, &msk->tun_flags, rule); in nfp_flower_compile_ipv4_gre_tun()
502 nfp_flower_compile_ipv4_udp_tun(struct nfp_flower_ipv4_udp_tun *ext, in nfp_flower_compile_ipv4_udp_tun() argument
506 nfp_flower_compile_tun_ipv4_addrs(&ext->ipv4, &msk->ipv4, rule); in nfp_flower_compile_ipv4_udp_tun()
507 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv4_udp_tun()
508 nfp_flower_compile_tun_udp_key(&ext->tun_id, &msk->tun_id, rule); in nfp_flower_compile_ipv4_udp_tun()
512 nfp_flower_compile_ipv6_udp_tun(struct nfp_flower_ipv6_udp_tun *ext, in nfp_flower_compile_ipv6_udp_tun() argument
516 nfp_flower_compile_tun_ipv6_addrs(&ext->ipv6, &msk->ipv6, rule); in nfp_flower_compile_ipv6_udp_tun()
517 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv6_udp_tun()
518 nfp_flower_compile_tun_udp_key(&ext->tun_id, &msk->tun_id, rule); in nfp_flower_compile_ipv6_udp_tun()
522 nfp_flower_compile_ipv6_gre_tun(struct nfp_flower_ipv6_gre_tun *ext, in nfp_flower_compile_ipv6_gre_tun() argument
527 ext->ethertype = cpu_to_be16(ETH_P_TEB); in nfp_flower_compile_ipv6_gre_tun()
530 nfp_flower_compile_tun_ipv6_addrs(&ext->ipv6, &msk->ipv6, rule); in nfp_flower_compile_ipv6_gre_tun()
531 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, rule); in nfp_flower_compile_ipv6_gre_tun()
532 nfp_flower_compile_tun_gre_key(&ext->tun_key, &msk->tun_key, in nfp_flower_compile_ipv6_gre_tun()
533 &ext->tun_flags, &msk->tun_flags, rule); in nfp_flower_compile_ipv6_gre_tun()
549 u8 *ext; in nfp_flower_compile_flow_match() local
557 ext = nfp_flow->unmasked_data; in nfp_flower_compile_flow_match()
562 nfp_flower_compile_meta_tci((struct nfp_flower_meta_tci *)ext, in nfp_flower_compile_flow_match()
565 ext += sizeof(struct nfp_flower_meta_tci); in nfp_flower_compile_flow_match()
570 nfp_flower_compile_ext_meta((struct nfp_flower_ext_meta *)ext, in nfp_flower_compile_flow_match()
574 ext += sizeof(struct nfp_flower_ext_meta); in nfp_flower_compile_flow_match()
579 err = nfp_flower_compile_port((struct nfp_flower_in_port *)ext, in nfp_flower_compile_flow_match()
590 ext += sizeof(struct nfp_flower_in_port); in nfp_flower_compile_flow_match()
594 err = nfp_flower_compile_mac_mpls((struct nfp_flower_mac_mpls *)ext, in nfp_flower_compile_flow_match()
600 ext += sizeof(struct nfp_flower_mac_mpls); in nfp_flower_compile_flow_match()
605 nfp_flower_compile_tport((struct nfp_flower_tp_ports *)ext, in nfp_flower_compile_flow_match()
608 ext += sizeof(struct nfp_flower_tp_ports); in nfp_flower_compile_flow_match()
613 nfp_flower_compile_ipv4((struct nfp_flower_ipv4 *)ext, in nfp_flower_compile_flow_match()
616 ext += sizeof(struct nfp_flower_ipv4); in nfp_flower_compile_flow_match()
621 nfp_flower_compile_ipv6((struct nfp_flower_ipv6 *)ext, in nfp_flower_compile_flow_match()
624 ext += sizeof(struct nfp_flower_ipv6); in nfp_flower_compile_flow_match()
629 nfp_flower_compile_vlan((struct nfp_flower_vlan *)ext, in nfp_flower_compile_flow_match()
632 ext += sizeof(struct nfp_flower_vlan); in nfp_flower_compile_flow_match()
642 nfp_flower_compile_ipv6_gre_tun((void *)ext, in nfp_flower_compile_flow_match()
644 gre_match = (struct nfp_flower_ipv6_gre_tun *)ext; in nfp_flower_compile_flow_match()
646 ext += sizeof(struct nfp_flower_ipv6_gre_tun); in nfp_flower_compile_flow_match()
657 nfp_flower_compile_ipv4_gre_tun((void *)ext, in nfp_flower_compile_flow_match()
659 dst = ((struct nfp_flower_ipv4_gre_tun *)ext)->ipv4.dst; in nfp_flower_compile_flow_match()
660 ext += sizeof(struct nfp_flower_ipv4_gre_tun); in nfp_flower_compile_flow_match()
678 nfp_flower_compile_ipv6_udp_tun((void *)ext, in nfp_flower_compile_flow_match()
680 udp_match = (struct nfp_flower_ipv6_udp_tun *)ext; in nfp_flower_compile_flow_match()
682 ext += sizeof(struct nfp_flower_ipv6_udp_tun); in nfp_flower_compile_flow_match()
693 nfp_flower_compile_ipv4_udp_tun((void *)ext, in nfp_flower_compile_flow_match()
695 dst = ((struct nfp_flower_ipv4_udp_tun *)ext)->ipv4.dst; in nfp_flower_compile_flow_match()
696 ext += sizeof(struct nfp_flower_ipv4_udp_tun); in nfp_flower_compile_flow_match()
707 nfp_flower_compile_geneve_opt(ext, msk, rule); in nfp_flower_compile_flow_match()
714 ext_len = (u32 *)ext - (u32 *)nfp_flow->unmasked_data; in nfp_flower_compile_flow_match()