Lines Matching refs:is_mask

93 			 size_t offset, size_t size, bool is_mask)
99 if (!is_mask)
117 #define SW_FLOW_KEY_PUT(match, field, value, is_mask) \
120 sizeof((match)->key->field), is_mask); \
121 if (is_mask) \
127 #define SW_FLOW_KEY_MEMCPY_OFFSET(match, offset, value_p, len, is_mask) \
129 update_range(match, offset, len, is_mask); \
130 if (is_mask) \
137 #define SW_FLOW_KEY_MEMCPY(match, field, value_p, len, is_mask) \
139 value_p, len, is_mask)
141 #define SW_FLOW_KEY_MEMSET_FIELD(match, field, value, is_mask) \
144 sizeof((match)->key->field), is_mask); \
145 if (is_mask) \
523 struct sw_flow_match *match, bool is_mask,
544 if (!is_mask) {
569 nla_len(a), is_mask);
574 struct sw_flow_match *match, bool is_mask,
618 if (!is_mask)
625 is_mask);
630 struct sw_flow_match *match, bool is_mask,
644 if (!is_mask)
652 nla_len(a), is_mask);
657 struct sw_flow_match *match, bool is_mask,
687 nla_get_be64(a), is_mask);
692 nla_get_in_addr(a), is_mask);
697 nla_get_in_addr(a), is_mask);
702 nla_get_in6_addr(a), is_mask);
707 nla_get_in6_addr(a), is_mask);
712 nla_get_u8(a), is_mask);
716 nla_get_u8(a), is_mask);
727 nla_get_be16(a), is_mask);
731 nla_get_be16(a), is_mask);
742 err = genev_tun_opt_from_nlattr(a, match, is_mask, log);
755 err = vxlan_tun_opt_from_nlattr(a, match, is_mask, log);
770 err = erspan_tun_opt_from_nlattr(a, match, is_mask,
789 SW_FLOW_KEY_PUT(match, tun_key.tun_flags, tun_flags, is_mask);
790 if (is_mask)
807 if (!is_mask) {
965 bool is_mask, bool inner)
977 SW_FLOW_KEY_PUT(match, eth.vlan.tpid, tpid, is_mask);
978 SW_FLOW_KEY_PUT(match, eth.vlan.tci, tci, is_mask);
980 SW_FLOW_KEY_PUT(match, eth.cvlan.tpid, tpid, is_mask);
981 SW_FLOW_KEY_PUT(match, eth.cvlan.tci, tci, is_mask);
1068 const struct nlattr **a, bool is_mask,
1074 if (!is_mask)
1083 err = encode_vlan_from_nlattrs(match, a, is_mask, inner);
1093 if (!is_mask)
1103 bool is_mask, bool log)
1109 is_mask, log);
1116 is_mask, log);
1126 bool is_mask, bool log)
1131 if (is_mask) {
1140 SW_FLOW_KEY_PUT(match, eth.type, eth_type, is_mask);
1147 bool is_mask, bool log)
1154 SW_FLOW_KEY_PUT(match, ovs_flow_hash, hash_val, is_mask);
1161 SW_FLOW_KEY_PUT(match, recirc_id, recirc_id, is_mask);
1167 nla_get_u32(a[OVS_KEY_ATTR_PRIORITY]), is_mask);
1174 if (is_mask) {
1182 SW_FLOW_KEY_PUT(match, phy.in_port, in_port, is_mask);
1184 } else if (!is_mask) {
1185 SW_FLOW_KEY_PUT(match, phy.in_port, DP_MAX_PORTS, is_mask);
1191 SW_FLOW_KEY_PUT(match, phy.skb_mark, mark, is_mask);
1196 is_mask, log) < 0)
1211 SW_FLOW_KEY_PUT(match, ct_state, ct_state, is_mask);
1218 SW_FLOW_KEY_PUT(match, ct_zone, ct_zone, is_mask);
1225 SW_FLOW_KEY_PUT(match, ct.mark, mark, is_mask);
1234 sizeof(*cl), is_mask);
1242 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.src, ct->ipv4_src, is_mask);
1243 SW_FLOW_KEY_PUT(match, ipv4.ct_orig.dst, ct->ipv4_dst, is_mask);
1244 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1245 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1246 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv4_proto, is_mask);
1256 is_mask);
1259 is_mask);
1260 SW_FLOW_KEY_PUT(match, ct.orig_tp.src, ct->src_port, is_mask);
1261 SW_FLOW_KEY_PUT(match, ct.orig_tp.dst, ct->dst_port, is_mask);
1262 SW_FLOW_KEY_PUT(match, ct_orig_proto, ct->ipv6_proto, is_mask);
1274 SW_FLOW_KEY_PUT(match, mac_proto, is_mask ? 0xff : mac_proto, is_mask);
1277 return parse_eth_type_from_nlattrs(match, attrs, a, is_mask,
1378 struct sw_flow_match *match, bool is_mask,
1389 if (WARN_ON(is_push_nsh && is_mask))
1421 base->flags, is_mask);
1423 base->ttl, is_mask);
1425 base->mdtype, is_mask);
1427 base->np, is_mask);
1429 base->path_hdr, is_mask);
1438 md1->context[i], is_mask);
1477 if (!is_mask) {
1500 bool is_mask, bool log)
1504 err = metadata_from_nlattrs(net, match, &attrs, a, is_mask, log);
1513 eth_key->eth_src, ETH_ALEN, is_mask);
1515 eth_key->eth_dst, ETH_ALEN, is_mask);
1527 err = parse_eth_type_from_nlattrs(match, &attrs, a, is_mask,
1531 } else if (!is_mask) {
1532 SW_FLOW_KEY_PUT(match, eth.type, htons(ETH_P_802_2), is_mask);
1543 if (!is_mask && ipv4_key->ipv4_frag > OVS_FRAG_TYPE_MAX) {
1549 ipv4_key->ipv4_proto, is_mask);
1551 ipv4_key->ipv4_tos, is_mask);
1553 ipv4_key->ipv4_ttl, is_mask);
1555 ipv4_key->ipv4_frag, is_mask);
1557 ipv4_key->ipv4_src, is_mask);
1559 ipv4_key->ipv4_dst, is_mask);
1567 if (!is_mask && ipv6_key->ipv6_frag > OVS_FRAG_TYPE_MAX) {
1573 if (!is_mask && ipv6_key->ipv6_label & htonl(0xFFF00000)) {
1580 ipv6_key->ipv6_label, is_mask);
1582 ipv6_key->ipv6_proto, is_mask);
1584 ipv6_key->ipv6_tclass, is_mask);
1586 ipv6_key->ipv6_hlimit, is_mask);
1588 ipv6_key->ipv6_frag, is_mask);
1592 is_mask);
1596 is_mask);
1605 if (!is_mask && (arp_key->arp_op & htons(0xff00))) {
1612 arp_key->arp_sip, is_mask);
1614 arp_key->arp_tip, is_mask);
1616 ntohs(arp_key->arp_op), is_mask);
1618 arp_key->arp_sha, ETH_ALEN, is_mask);
1620 arp_key->arp_tha, ETH_ALEN, is_mask);
1627 is_mask, false, log) < 0)
1649 mpls_key[i].mpls_lse, is_mask);
1652 label_count_mask, is_mask);
1661 SW_FLOW_KEY_PUT(match, tp.src, tcp_key->tcp_src, is_mask);
1662 SW_FLOW_KEY_PUT(match, tp.dst, tcp_key->tcp_dst, is_mask);
1669 is_mask);
1677 SW_FLOW_KEY_PUT(match, tp.src, udp_key->udp_src, is_mask);
1678 SW_FLOW_KEY_PUT(match, tp.dst, udp_key->udp_dst, is_mask);
1686 SW_FLOW_KEY_PUT(match, tp.src, sctp_key->sctp_src, is_mask);
1687 SW_FLOW_KEY_PUT(match, tp.dst, sctp_key->sctp_dst, is_mask);
1696 htons(icmp_key->icmp_type), is_mask);
1698 htons(icmp_key->icmp_code), is_mask);
1707 htons(icmpv6_key->icmpv6_type), is_mask);
1709 htons(icmpv6_key->icmpv6_code), is_mask);
1720 is_mask);
1722 nd_key->nd_sll, ETH_ALEN, is_mask);
1724 nd_key->nd_tll, ETH_ALEN, is_mask);
1950 bool is_mask)
1952 __be16 eth_type = !is_mask ? vh->tpid : htons(0xffff);
1960 static int nsh_key_to_nlattr(const struct ovs_key_nsh *nsh, bool is_mask,
1972 if (is_mask || nsh->base.mdtype == NSH_M_TYPE1) {
1989 const struct sw_flow_key *output, bool is_mask,
2006 if ((swkey->tun_proto || is_mask)) {
2018 if (is_mask && (output->phy.in_port == 0xffff))
2023 upper_u16 = !is_mask ? 0 : 0xffff;
2046 if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask))
2053 if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask))
2069 if (is_mask && output->eth.type)
2118 if (nsh_key_to_nlattr(&output->nsh, is_mask, skb))
2234 const struct sw_flow_key *output, int attr, bool is_mask,
2243 err = __ovs_nla_put_key(swkey, output, is_mask, skb);
2800 static bool validate_nsh(const struct nlattr *attr, bool is_mask,
2808 ret = nsh_key_put_from_nlattr(attr, &match, is_mask,