Lines Matching refs:ext

11 nfp_flower_compile_meta_tci(struct nfp_flower_meta_tci *ext,  in nfp_flower_compile_meta_tci()  argument
18 memset(ext, 0, sizeof(struct nfp_flower_meta_tci)); in nfp_flower_compile_meta_tci()
22 ext->nfp_flow_key_layer = key_type; in nfp_flower_compile_meta_tci()
23 ext->mask_id = ~0; in nfp_flower_compile_meta_tci()
38 ext->tci = cpu_to_be16(tmp_tci); in nfp_flower_compile_meta_tci()
79 nfp_flower_compile_mac(struct nfp_flower_mac_mpls *ext, in nfp_flower_compile_mac() argument
85 memset(ext, 0, sizeof(struct nfp_flower_mac_mpls)); in nfp_flower_compile_mac()
93 ether_addr_copy(ext->mac_dst, &match.key->dst[0]); in nfp_flower_compile_mac()
94 ether_addr_copy(ext->mac_src, &match.key->src[0]); in nfp_flower_compile_mac()
108 ext->mpls_lse = cpu_to_be32(t_mpls); in nfp_flower_compile_mac()
124 ext->mpls_lse = cpu_to_be32(NFP_FLOWER_MASK_MPLS_Q); in nfp_flower_compile_mac()
131 nfp_flower_compile_tport(struct nfp_flower_tp_ports *ext, in nfp_flower_compile_tport() argument
137 memset(ext, 0, sizeof(struct nfp_flower_tp_ports)); in nfp_flower_compile_tport()
144 ext->port_src = match.key->src; in nfp_flower_compile_tport()
145 ext->port_dst = match.key->dst; in nfp_flower_compile_tport()
152 nfp_flower_compile_ip_ext(struct nfp_flower_ip_ext *ext, in nfp_flower_compile_ip_ext() argument
162 ext->proto = match.key->ip_proto; in nfp_flower_compile_ip_ext()
170 ext->tos = match.key->tos; in nfp_flower_compile_ip_ext()
171 ext->ttl = match.key->ttl; in nfp_flower_compile_ip_ext()
185 ext->flags |= NFP_FL_TCP_FLAG_FIN; in nfp_flower_compile_ip_ext()
190 ext->flags |= NFP_FL_TCP_FLAG_SYN; in nfp_flower_compile_ip_ext()
195 ext->flags |= NFP_FL_TCP_FLAG_RST; in nfp_flower_compile_ip_ext()
200 ext->flags |= NFP_FL_TCP_FLAG_PSH; in nfp_flower_compile_ip_ext()
205 ext->flags |= NFP_FL_TCP_FLAG_URG; in nfp_flower_compile_ip_ext()
215 ext->flags |= NFP_FL_IP_FRAGMENTED; in nfp_flower_compile_ip_ext()
219 ext->flags |= NFP_FL_IP_FRAG_FIRST; in nfp_flower_compile_ip_ext()
226 nfp_flower_compile_ipv4(struct nfp_flower_ipv4 *ext, in nfp_flower_compile_ipv4() argument
233 memset(ext, 0, sizeof(struct nfp_flower_ipv4)); in nfp_flower_compile_ipv4()
238 ext->ipv4_src = match.key->src; in nfp_flower_compile_ipv4()
239 ext->ipv4_dst = match.key->dst; in nfp_flower_compile_ipv4()
244 nfp_flower_compile_ip_ext(&ext->ip_ext, &msk->ip_ext, flow); in nfp_flower_compile_ipv4()
248 nfp_flower_compile_ipv6(struct nfp_flower_ipv6 *ext, in nfp_flower_compile_ipv6() argument
254 memset(ext, 0, sizeof(struct nfp_flower_ipv6)); in nfp_flower_compile_ipv6()
261 ext->ipv6_src = match.key->src; in nfp_flower_compile_ipv6()
262 ext->ipv6_dst = match.key->dst; in nfp_flower_compile_ipv6()
267 nfp_flower_compile_ip_ext(&ext->ip_ext, &msk->ip_ext, flow); in nfp_flower_compile_ipv6()
271 nfp_flower_compile_geneve_opt(void *ext, void *msk, in nfp_flower_compile_geneve_opt() argument
277 memcpy(ext, match.key->data, match.key->len); in nfp_flower_compile_geneve_opt()
284 nfp_flower_compile_tun_ipv4_addrs(struct nfp_flower_tun_ipv4 *ext, in nfp_flower_compile_tun_ipv4_addrs() argument
294 ext->src = match.key->src; in nfp_flower_compile_tun_ipv4_addrs()
295 ext->dst = match.key->dst; in nfp_flower_compile_tun_ipv4_addrs()
302 nfp_flower_compile_tun_ip_ext(struct nfp_flower_tun_ip_ext *ext, in nfp_flower_compile_tun_ip_ext() argument
312 ext->tos = match.key->tos; in nfp_flower_compile_tun_ip_ext()
313 ext->ttl = match.key->ttl; in nfp_flower_compile_tun_ip_ext()
320 nfp_flower_compile_ipv4_gre_tun(struct nfp_flower_ipv4_gre_tun *ext, in nfp_flower_compile_ipv4_gre_tun() argument
326 memset(ext, 0, sizeof(struct nfp_flower_ipv4_gre_tun)); in nfp_flower_compile_ipv4_gre_tun()
330 ext->ethertype = cpu_to_be16(ETH_P_TEB); in nfp_flower_compile_ipv4_gre_tun()
337 ext->tun_key = match.key->keyid; in nfp_flower_compile_ipv4_gre_tun()
340 ext->tun_flags = cpu_to_be16(NFP_FL_GRE_FLAG_KEY); in nfp_flower_compile_ipv4_gre_tun()
344 nfp_flower_compile_tun_ipv4_addrs(&ext->ipv4, &msk->ipv4, flow); in nfp_flower_compile_ipv4_gre_tun()
345 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, flow); in nfp_flower_compile_ipv4_gre_tun()
349 nfp_flower_compile_ipv4_udp_tun(struct nfp_flower_ipv4_udp_tun *ext, in nfp_flower_compile_ipv4_udp_tun() argument
355 memset(ext, 0, sizeof(struct nfp_flower_ipv4_udp_tun)); in nfp_flower_compile_ipv4_udp_tun()
364 ext->tun_id = cpu_to_be32(temp_vni); in nfp_flower_compile_ipv4_udp_tun()
369 nfp_flower_compile_tun_ipv4_addrs(&ext->ipv4, &msk->ipv4, flow); in nfp_flower_compile_ipv4_udp_tun()
370 nfp_flower_compile_tun_ip_ext(&ext->ip_ext, &msk->ip_ext, flow); in nfp_flower_compile_ipv4_udp_tun()
383 u8 *ext; in nfp_flower_compile_flow_match() local
391 ext = nfp_flow->unmasked_data; in nfp_flower_compile_flow_match()
394 nfp_flower_compile_meta_tci((struct nfp_flower_meta_tci *)ext, in nfp_flower_compile_flow_match()
397 ext += sizeof(struct nfp_flower_meta_tci); in nfp_flower_compile_flow_match()
402 nfp_flower_compile_ext_meta((struct nfp_flower_ext_meta *)ext, in nfp_flower_compile_flow_match()
406 ext += sizeof(struct nfp_flower_ext_meta); in nfp_flower_compile_flow_match()
411 err = nfp_flower_compile_port((struct nfp_flower_in_port *)ext, in nfp_flower_compile_flow_match()
422 ext += sizeof(struct nfp_flower_in_port); in nfp_flower_compile_flow_match()
426 nfp_flower_compile_mac((struct nfp_flower_mac_mpls *)ext, in nfp_flower_compile_flow_match()
429 ext += sizeof(struct nfp_flower_mac_mpls); in nfp_flower_compile_flow_match()
434 nfp_flower_compile_tport((struct nfp_flower_tp_ports *)ext, in nfp_flower_compile_flow_match()
437 ext += sizeof(struct nfp_flower_tp_ports); in nfp_flower_compile_flow_match()
442 nfp_flower_compile_ipv4((struct nfp_flower_ipv4 *)ext, in nfp_flower_compile_flow_match()
445 ext += sizeof(struct nfp_flower_ipv4); in nfp_flower_compile_flow_match()
450 nfp_flower_compile_ipv6((struct nfp_flower_ipv6 *)ext, in nfp_flower_compile_flow_match()
453 ext += sizeof(struct nfp_flower_ipv6); in nfp_flower_compile_flow_match()
460 nfp_flower_compile_ipv4_gre_tun((void *)ext, (void *)msk, flow); in nfp_flower_compile_flow_match()
461 tun_dst = ((struct nfp_flower_ipv4_gre_tun *)ext)->ipv4.dst; in nfp_flower_compile_flow_match()
462 ext += sizeof(struct nfp_flower_ipv4_gre_tun); in nfp_flower_compile_flow_match()
476 nfp_flower_compile_ipv4_udp_tun((void *)ext, (void *)msk, flow); in nfp_flower_compile_flow_match()
477 tun_dst = ((struct nfp_flower_ipv4_udp_tun *)ext)->ipv4.dst; in nfp_flower_compile_flow_match()
478 ext += sizeof(struct nfp_flower_ipv4_udp_tun); in nfp_flower_compile_flow_match()
488 err = nfp_flower_compile_geneve_opt(ext, msk, flow); in nfp_flower_compile_flow_match()