Lines Matching full:match
382 struct flow_match_meta match; in ocelot_flower_parse_indev() local
385 flow_rule_match_meta(rule, &match); in ocelot_flower_parse_indev()
387 if (!match.mask->ingress_ifindex) in ocelot_flower_parse_indev()
390 if (match.mask->ingress_ifindex != 0xFFFFFFFF) { in ocelot_flower_parse_indev()
399 indev = __dev_get_by_index(dev_net(dev), match.key->ingress_ifindex); in ocelot_flower_parse_indev()
402 "Can't find the ingress port to match on"); in ocelot_flower_parse_indev()
430 struct flow_dissector *dissector = rule->match.dissector; in ocelot_flower_parse_key()
448 /* For VCAP ES0 (egress rewriter) we can match on the ingress port */ in ocelot_flower_parse_key()
456 struct flow_match_control match; in ocelot_flower_parse_key() local
458 flow_rule_match_control(rule, &match); in ocelot_flower_parse_key()
462 struct flow_match_eth_addrs match; in ocelot_flower_parse_key() local
466 "VCAP ES0 cannot match on MAC address"); in ocelot_flower_parse_key()
471 !is_zero_ether_addr(match.mask->dst)) { in ocelot_flower_parse_key()
473 "Key type S1_NORMAL cannot match on destination MAC"); in ocelot_flower_parse_key()
490 flow_rule_match_eth_addrs(rule, &match); in ocelot_flower_parse_key()
493 match.key->dst); in ocelot_flower_parse_key()
495 match.key->src); in ocelot_flower_parse_key()
497 match.mask->dst); in ocelot_flower_parse_key()
499 match.mask->src); in ocelot_flower_parse_key()
504 struct flow_match_basic match; in ocelot_flower_parse_key() local
506 flow_rule_match_basic(rule, &match); in ocelot_flower_parse_key()
507 if (ntohs(match.key->n_proto) == ETH_P_IP) { in ocelot_flower_parse_key()
510 "VCAP ES0 cannot match on IP protocol"); in ocelot_flower_parse_key()
516 match.key->ip_proto; in ocelot_flower_parse_key()
518 match.mask->ip_proto; in ocelot_flower_parse_key()
521 if (ntohs(match.key->n_proto) == ETH_P_IPV6) { in ocelot_flower_parse_key()
524 "VCAP ES0 cannot match on IP protocol"); in ocelot_flower_parse_key()
530 match.key->ip_proto; in ocelot_flower_parse_key()
532 match.mask->ip_proto; in ocelot_flower_parse_key()
539 struct flow_match_ipv4_addrs match; in ocelot_flower_parse_key() local
544 "VCAP ES0 cannot match on IP address"); in ocelot_flower_parse_key()
548 flow_rule_match_ipv4_addrs(rule, &match); in ocelot_flower_parse_key()
550 if (filter->block_id == VCAP_IS1 && *(u32 *)&match.mask->dst) { in ocelot_flower_parse_key()
552 "Key type S1_NORMAL cannot match on destination IP"); in ocelot_flower_parse_key()
557 memcpy(tmp, &match.key->src, 4); in ocelot_flower_parse_key()
560 memcpy(tmp, &match.mask->src, 4); in ocelot_flower_parse_key()
563 memcpy(tmp, &match.key->dst, 4); in ocelot_flower_parse_key()
566 memcpy(tmp, &match.mask->dst, 4); in ocelot_flower_parse_key()
576 struct flow_match_ports match; in ocelot_flower_parse_key() local
580 "VCAP ES0 cannot match on L4 ports"); in ocelot_flower_parse_key()
584 flow_rule_match_ports(rule, &match); in ocelot_flower_parse_key()
585 filter->key.ipv4.sport.value = ntohs(match.key->src); in ocelot_flower_parse_key()
586 filter->key.ipv4.sport.mask = ntohs(match.mask->src); in ocelot_flower_parse_key()
587 filter->key.ipv4.dport.value = ntohs(match.key->dst); in ocelot_flower_parse_key()
588 filter->key.ipv4.dport.mask = ntohs(match.mask->dst); in ocelot_flower_parse_key()
593 struct flow_match_vlan match; in ocelot_flower_parse_key() local
595 flow_rule_match_vlan(rule, &match); in ocelot_flower_parse_key()
597 filter->vlan.vid.value = match.key->vlan_id; in ocelot_flower_parse_key()
598 filter->vlan.vid.mask = match.mask->vlan_id; in ocelot_flower_parse_key()
599 filter->vlan.pcp.value[0] = match.key->vlan_priority; in ocelot_flower_parse_key()
600 filter->vlan.pcp.mask[0] = match.mask->vlan_priority; in ocelot_flower_parse_key()
608 "VCAP ES0 cannot match on L2 proto"); in ocelot_flower_parse_key()