Lines Matching refs:mask
197 const __be32 *mpls_lse, const __be32 *mask) in set_mpls() argument
207 lse = OVS_MASKED(stack->label_stack_entry, *mpls_lse, *mask); in set_mpls()
248 const u16 *mask = (const u16 *)mask_; in ether_addr_copy_masked() local
250 OVS_SET_MASKED(dst[0], src[0], mask[0]); in ether_addr_copy_masked()
251 OVS_SET_MASKED(dst[1], src[1], mask[1]); in ether_addr_copy_masked()
252 OVS_SET_MASKED(dst[2], src[2], mask[2]); in ether_addr_copy_masked()
257 const struct ovs_key_ethernet *mask) in set_eth_addr() argument
268 mask->eth_src); in set_eth_addr()
270 mask->eth_dst); in set_eth_addr()
408 const __be32 mask[4], __be32 masked[4]) in mask_ipv6_addr()
410 masked[0] = OVS_MASKED(old[0], addr[0], mask[0]); in mask_ipv6_addr()
411 masked[1] = OVS_MASKED(old[1], addr[1], mask[1]); in mask_ipv6_addr()
412 masked[2] = OVS_MASKED(old[2], addr[2], mask[2]); in mask_ipv6_addr()
413 masked[3] = OVS_MASKED(old[3], addr[3], mask[3]); in mask_ipv6_addr()
428 static void set_ipv6_dsfield(struct sk_buff *skb, struct ipv6hdr *nh, u8 ipv6_tclass, u8 mask) in set_ipv6_dsfield() argument
432 ipv6_tclass = OVS_MASKED(old_ipv6_tclass, ipv6_tclass, mask); in set_ipv6_dsfield()
438 ipv6_change_dsfield(nh, ~mask, ipv6_tclass); in set_ipv6_dsfield()
441 static void set_ipv6_fl(struct sk_buff *skb, struct ipv6hdr *nh, u32 fl, u32 mask) in set_ipv6_fl() argument
446 fl = OVS_MASKED(ofl, fl, mask); in set_ipv6_fl()
457 static void set_ipv6_ttl(struct sk_buff *skb, struct ipv6hdr *nh, u8 new_ttl, u8 mask) in set_ipv6_ttl() argument
459 new_ttl = OVS_MASKED(nh->hop_limit, new_ttl, mask); in set_ipv6_ttl()
468 u8 mask) in set_ip_ttl() argument
470 new_ttl = OVS_MASKED(nh->ttl, new_ttl, mask); in set_ip_ttl()
478 const struct ovs_key_ipv4 *mask) in set_ipv4() argument
495 if (mask->ipv4_src) { in set_ipv4()
496 new_addr = OVS_MASKED(nh->saddr, key->ipv4_src, mask->ipv4_src); in set_ipv4()
503 if (mask->ipv4_dst) { in set_ipv4()
504 new_addr = OVS_MASKED(nh->daddr, key->ipv4_dst, mask->ipv4_dst); in set_ipv4()
511 if (mask->ipv4_tos) { in set_ipv4()
512 ipv4_change_dsfield(nh, ~mask->ipv4_tos, key->ipv4_tos); in set_ipv4()
515 if (mask->ipv4_ttl) { in set_ipv4()
516 set_ip_ttl(skb, nh, key->ipv4_ttl, mask->ipv4_ttl); in set_ipv4()
530 const struct ovs_key_ipv6 *mask) in set_ipv6() argument
546 if (is_ipv6_mask_nonzero(mask->ipv6_src)) { in set_ipv6()
550 mask_ipv6_addr(saddr, key->ipv6_src, mask->ipv6_src, masked); in set_ipv6()
559 if (is_ipv6_mask_nonzero(mask->ipv6_dst)) { in set_ipv6()
566 mask_ipv6_addr(daddr, key->ipv6_dst, mask->ipv6_dst, masked); in set_ipv6()
581 if (mask->ipv6_tclass) { in set_ipv6()
582 set_ipv6_dsfield(skb, nh, key->ipv6_tclass, mask->ipv6_tclass); in set_ipv6()
585 if (mask->ipv6_label) { in set_ipv6()
587 ntohl(mask->ipv6_label)); in set_ipv6()
591 if (mask->ipv6_hlimit) { in set_ipv6()
592 set_ipv6_ttl(skb, nh, key->ipv6_hlimit, mask->ipv6_hlimit); in set_ipv6()
609 struct ovs_key_nsh mask; in set_nsh() local
611 err = nsh_key_from_nlattr(a, &key, &mask); in set_nsh()
631 flags = OVS_MASKED(flags, key.base.flags, mask.base.flags); in set_nsh()
634 ttl = OVS_MASKED(ttl, key.base.ttl, mask.base.ttl); in set_nsh()
638 mask.base.path_hdr); in set_nsh()
645 mask.context[i]); in set_nsh()
672 const struct ovs_key_udp *mask) in set_udp() argument
685 src = OVS_MASKED(uh->source, key->udp_src, mask->udp_src); in set_udp()
686 dst = OVS_MASKED(uh->dest, key->udp_dst, mask->udp_dst); in set_udp()
715 const struct ovs_key_tcp *mask) in set_tcp() argument
727 src = OVS_MASKED(th->source, key->tcp_src, mask->tcp_src); in set_tcp()
732 dst = OVS_MASKED(th->dest, key->tcp_dst, mask->tcp_dst); in set_tcp()
744 const struct ovs_key_sctp *mask) in set_sctp() argument
759 sh->source = OVS_MASKED(sh->source, key->sctp_src, mask->sctp_src); in set_sctp()
760 sh->dest = OVS_MASKED(sh->dest, key->sctp_dst, mask->sctp_dst); in set_sctp()