Lines Matching refs:ext

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