Lines Matching defs:is_mask

95 			 size_t offset, size_t size, bool is_mask)
101 if (!is_mask)
119 #define SW_FLOW_KEY_PUT(match, field, value, is_mask) \
122 sizeof((match)->key->field), is_mask); \
123 if (is_mask) \
129 #define SW_FLOW_KEY_MEMCPY_OFFSET(match, offset, value_p, len, is_mask) \
131 update_range(match, offset, len, is_mask); \
132 if (is_mask) \
139 #define SW_FLOW_KEY_MEMCPY(match, field, value_p, len, is_mask) \
141 value_p, len, is_mask)
143 #define SW_FLOW_KEY_MEMSET_FIELD(match, field, value, is_mask) \
146 sizeof((match)->key->field), is_mask); \
147 if (is_mask) \
535 struct sw_flow_match *match, bool is_mask,
556 if (!is_mask) {
581 nla_len(a), is_mask);
586 struct sw_flow_match *match, bool is_mask,
630 if (!is_mask)
637 is_mask);
642 struct sw_flow_match *match, bool is_mask,
656 if (!is_mask)
664 nla_len(a), is_mask);
669 struct sw_flow_match *match, bool is_mask,
699 nla_get_be64(a), is_mask);
704 nla_get_in_addr(a), is_mask);
709 nla_get_in_addr(a), is_mask);
714 nla_get_in6_addr(a), is_mask);
719 nla_get_in6_addr(a), is_mask);
724 nla_get_u8(a), is_mask);
728 nla_get_u8(a), is_mask);
739 nla_get_be16(a), is_mask);
743 nla_get_be16(a), is_mask);
754 err = genev_tun_opt_from_nlattr(a, match, is_mask, log);
767 err = vxlan_tun_opt_from_nlattr(a, match, is_mask, log);
782 err = erspan_tun_opt_from_nlattr(a, match, is_mask,
801 SW_FLOW_KEY_PUT(match, tun_key.tun_flags, tun_flags, is_mask);
802 if (is_mask)
819 if (!is_mask) {
977 bool is_mask, bool inner)
989 SW_FLOW_KEY_PUT(match, eth.vlan.tpid, tpid, is_mask);
990 SW_FLOW_KEY_PUT(match, eth.vlan.tci, tci, is_mask);
992 SW_FLOW_KEY_PUT(match, eth.cvlan.tpid, tpid, is_mask);
993 SW_FLOW_KEY_PUT(match, eth.cvlan.tci, tci, is_mask);
1080 const struct nlattr **a, bool is_mask,
1086 if (!is_mask)
1095 err = encode_vlan_from_nlattrs(match, a, is_mask, inner);
1105 if (!is_mask)
1115 bool is_mask, bool log)
1121 is_mask, log);
1128 is_mask, log);
1138 bool is_mask, bool log)
1143 if (is_mask) {
1152 SW_FLOW_KEY_PUT(match, eth.type, eth_type, is_mask);
1159 bool is_mask, bool log)
1166 SW_FLOW_KEY_PUT(match, ovs_flow_hash, hash_val, is_mask);
1173 SW_FLOW_KEY_PUT(match, recirc_id, recirc_id, is_mask);
1179 nla_get_u32(a[OVS_KEY_ATTR_PRIORITY]), is_mask);
1186 if (is_mask) {
1194 SW_FLOW_KEY_PUT(match, phy.in_port, in_port, is_mask);
1196 } else if (!is_mask) {
1197 SW_FLOW_KEY_PUT(match, phy.in_port, DP_MAX_PORTS, is_mask);
1203 SW_FLOW_KEY_PUT(match, phy.skb_mark, mark, is_mask);
1208 is_mask, log) < 0)
1223 SW_FLOW_KEY_PUT(match, ct_state, ct_state, is_mask);
1230 SW_FLOW_KEY_PUT(match, ct_zone, ct_zone, is_mask);
1237 SW_FLOW_KEY_PUT(match, ct.mark, mark, is_mask);
1246 sizeof(*cl), is_mask);
1254 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.src, ct->ipv4_src, is_mask);
1255 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.dst, ct->ipv4_dst, is_mask);
1256 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1257 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1258 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv4_proto, is_mask);
1268 is_mask);
1271 is_mask);
1272 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1273 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1274 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv6_proto, is_mask);
1286 SW_FLOW_KEY_PUT(match, mac_proto, is_mask ? 0xff : mac_proto, is_mask);
1289 return parse_eth_type_from_nlattrs(match, attrs, a, is_mask,
1390 struct sw_flow_match *match, bool is_mask,
1401 if (WARN_ON(is_push_nsh && is_mask))
1433 base->flags, is_mask);
1435 base->ttl, is_mask);
1437 base->mdtype, is_mask);
1439 base->np, is_mask);
1441 base->path_hdr, is_mask);
1450 md1->context[i], is_mask);
1489 if (!is_mask) {
1512 bool is_mask, bool log)
1516 err = metadata_from_nlattrs(net, match, &attrs, a, is_mask, log);
1525 eth_key->eth_src, ETH_ALEN, is_mask);
1527 eth_key->eth_dst, ETH_ALEN, is_mask);
1539 err = parse_eth_type_from_nlattrs(match, &attrs, a, is_mask,
1543 } else if (!is_mask) {
1544 SW_FLOW_KEY_PUT(match, eth.type, htons(ETH_P_802_2), is_mask);
1555 if (!is_mask && ipv4_key->ipv4_frag > OVS_FRAG_TYPE_MAX) {
1561 ipv4_key->ipv4_proto, is_mask);
1563 ipv4_key->ipv4_tos, is_mask);
1565 ipv4_key->ipv4_ttl, is_mask);
1567 ipv4_key->ipv4_frag, is_mask);
1569 ipv4_key->ipv4_src, is_mask);
1571 ipv4_key->ipv4_dst, is_mask);
1579 if (!is_mask && ipv6_key->ipv6_frag > OVS_FRAG_TYPE_MAX) {
1585 if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) {
1592 ipv6_key->ipv6_label, is_mask);
1594 ipv6_key->ipv6_proto, is_mask);
1596 ipv6_key->ipv6_tclass, is_mask);
1598 ipv6_key->ipv6_hlimit, is_mask);
1600 ipv6_key->ipv6_frag, is_mask);
1604 is_mask);
1608 is_mask);
1619 ipv6_exthdrs_key->hdrs, is_mask);
1628 if (!is_mask && (arp_key->arp_op & htons(0xff00))) {
1635 arp_key->arp_sip, is_mask);
1637 arp_key->arp_tip, is_mask);
1639 ntohs(arp_key->arp_op), is_mask);
1641 arp_key->arp_sha, ETH_ALEN, is_mask);
1643 arp_key->arp_tha, ETH_ALEN, is_mask);
1650 is_mask, false, log) < 0)
1672 mpls_key[i].mpls_lse, is_mask);
1675 label_count_mask, is_mask);
1684 SW_FLOW_KEY_PUT(match, tp.src, tcp_key->tcp_src, is_mask);
1685 SW_FLOW_KEY_PUT(match, tp.dst, tcp_key->tcp_dst, is_mask);
1692 is_mask);
1700 SW_FLOW_KEY_PUT(match, tp.src, udp_key->udp_src, is_mask);
1701 SW_FLOW_KEY_PUT(match, tp.dst, udp_key->udp_dst, is_mask);
1709 SW_FLOW_KEY_PUT(match, tp.src, sctp_key->sctp_src, is_mask);
1710 SW_FLOW_KEY_PUT(match, tp.dst, sctp_key->sctp_dst, is_mask);
1719 htons(icmp_key->icmp_type), is_mask);
1721 htons(icmp_key->icmp_code), is_mask);
1730 htons(icmpv6_key->icmpv6_type), is_mask);
1732 htons(icmpv6_key->icmpv6_code), is_mask);
1743 is_mask);
1745 nd_key->nd_sll, ETH_ALEN, is_mask);
1747 nd_key->nd_tll, ETH_ALEN, is_mask);
1973 bool is_mask)
1975 __be16 eth_type = !is_mask ? vh->tpid : htons(0xffff);
1983 static int nsh_key_to_nlattr(const struct ovs_key_nsh *nsh, bool is_mask,
1995 if (is_mask || nsh->base.mdtype == NSH_M_TYPE1) {
2012 const struct sw_flow_key *output, bool is_mask,
2029 if ((swkey->tun_proto || is_mask)) {
2041 if (is_mask && (output->phy.in_port == 0xffff))
2046 upper_u16 = !is_mask ? 0 : 0xffff;
2069 if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask))
2076 if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask))
2092 if (is_mask && output->eth.type)
2149 if (nsh_key_to_nlattr(&output->nsh, is_mask, skb))
2265 const struct sw_flow_key *output, int attr, bool is_mask,
2274 err = __ovs_nla_put_key(swkey, output, is_mask, skb);
2841 static bool validate_nsh(const struct nlattr *attr, bool is_mask,
2849 ret = nsh_key_put_from_nlattr(attr, &match, is_mask,