Lines Matching defs:match
529 struct flow_match_meta match;
532 flow_rule_match_meta(rule, &match);
534 if (!match.mask->ingress_ifindex)
537 if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
546 indev = __dev_get_by_index(dev_net(dev), match.key->ingress_ifindex);
549 "Can't find the ingress port to match on");
577 struct flow_dissector *dissector = rule->match.dissector;
596 struct flow_match_meta match;
598 flow_rule_match_meta(rule, &match);
599 if (match.mask->l2_miss) {
600 NL_SET_ERR_MSG_MOD(extack, "Can't match on \"l2_miss\"");
605 /* For VCAP ES0 (egress rewriter) we can match on the ingress port */
613 struct flow_match_control match;
615 flow_rule_match_control(rule, &match);
619 struct flow_match_vlan match;
621 flow_rule_match_vlan(rule, &match);
623 filter->vlan.vid.value = match.key->vlan_id;
624 filter->vlan.vid.mask = match.mask->vlan_id;
625 filter->vlan.pcp.value[0] = match.key->vlan_priority;
626 filter->vlan.pcp.mask[0] = match.mask->vlan_priority;
631 struct flow_match_eth_addrs match;
635 "VCAP ES0 cannot match on MAC address");
652 flow_rule_match_eth_addrs(rule, &match);
655 !is_zero_ether_addr(match.mask->dst)) {
657 "Key type S1_NORMAL cannot match on destination MAC");
663 match.key->dst);
665 match.key->src);
667 match.mask->dst);
669 match.mask->src);
674 struct flow_match_basic match;
676 flow_rule_match_basic(rule, &match);
677 if (ntohs(match.key->n_proto) == ETH_P_IP) {
680 "VCAP ES0 cannot match on IP protocol");
686 match.key->ip_proto;
688 match.mask->ip_proto;
691 if (ntohs(match.key->n_proto) == ETH_P_IPV6) {
694 "VCAP ES0 cannot match on IP protocol");
700 match.key->ip_proto;
702 match.mask->ip_proto;
709 struct flow_match_ipv4_addrs match;
714 "VCAP ES0 cannot match on IP address");
718 flow_rule_match_ipv4_addrs(rule, &match);
720 if (filter->block_id == VCAP_IS1 && *(u32 *)&match.mask->dst) {
722 "Key type S1_NORMAL cannot match on destination IP");
727 memcpy(tmp, &match.key->src, 4);
730 memcpy(tmp, &match.mask->src, 4);
733 memcpy(tmp, &match.key->dst, 4);
736 memcpy(tmp, &match.mask->dst, 4);
746 struct flow_match_ports match;
750 "VCAP ES0 cannot match on L4 ports");
754 flow_rule_match_ports(rule, &match);
755 filter->key.ipv4.sport.value = ntohs(match.key->src);
756 filter->key.ipv4.sport.mask = ntohs(match.mask->src);
757 filter->key.ipv4.dport.value = ntohs(match.key->dst);
758 filter->key.ipv4.dport.mask = ntohs(match.mask->dst);
766 "VCAP ES0 cannot match on L2 proto");