Lines Matching defs:match
392 struct flow_match_meta match;
395 flow_rule_match_meta(rule, &match);
397 if (!match.mask->ingress_ifindex)
400 if (match.mask->ingress_ifindex != 0xFFFFFFFF) {
409 indev = __dev_get_by_index(dev_net(dev), match.key->ingress_ifindex);
412 "Can't find the ingress port to match on");
440 struct flow_dissector *dissector = rule->match.dissector;
458 /* For VCAP ES0 (egress rewriter) we can match on the ingress port */
466 struct flow_match_control match;
468 flow_rule_match_control(rule, &match);
472 struct flow_match_vlan match;
474 flow_rule_match_vlan(rule, &match);
476 filter->vlan.vid.value = match.key->vlan_id;
477 filter->vlan.vid.mask = match.mask->vlan_id;
478 filter->vlan.pcp.value[0] = match.key->vlan_priority;
479 filter->vlan.pcp.mask[0] = match.mask->vlan_priority;
484 struct flow_match_eth_addrs match;
488 "VCAP ES0 cannot match on MAC address");
505 flow_rule_match_eth_addrs(rule, &match);
508 !is_zero_ether_addr(match.mask->dst)) {
510 "Key type S1_NORMAL cannot match on destination MAC");
516 match.key->dst);
518 match.key->src);
520 match.mask->dst);
522 match.mask->src);
527 struct flow_match_basic match;
529 flow_rule_match_basic(rule, &match);
530 if (ntohs(match.key->n_proto) == ETH_P_IP) {
533 "VCAP ES0 cannot match on IP protocol");
539 match.key->ip_proto;
541 match.mask->ip_proto;
544 if (ntohs(match.key->n_proto) == ETH_P_IPV6) {
547 "VCAP ES0 cannot match on IP protocol");
553 match.key->ip_proto;
555 match.mask->ip_proto;
562 struct flow_match_ipv4_addrs match;
567 "VCAP ES0 cannot match on IP address");
571 flow_rule_match_ipv4_addrs(rule, &match);
573 if (filter->block_id == VCAP_IS1 && *(u32 *)&match.mask->dst) {
575 "Key type S1_NORMAL cannot match on destination IP");
580 memcpy(tmp, &match.key->src, 4);
583 memcpy(tmp, &match.mask->src, 4);
586 memcpy(tmp, &match.key->dst, 4);
589 memcpy(tmp, &match.mask->dst, 4);
599 struct flow_match_ports match;
603 "VCAP ES0 cannot match on L4 ports");
607 flow_rule_match_ports(rule, &match);
608 filter->key.ipv4.sport.value = ntohs(match.key->src);
609 filter->key.ipv4.sport.mask = ntohs(match.mask->src);
610 filter->key.ipv4.dport.value = ntohs(match.key->dst);
611 filter->key.ipv4.dport.mask = ntohs(match.mask->dst);
619 "VCAP ES0 cannot match on L2 proto");