Lines Matching refs:match

15 	struct flow_dissector *dissector = rule->match.dissector;  in dpaa2_switch_flower_parse_key()
33 acl_h = &acl_key->match; in dpaa2_switch_flower_parse_key()
37 struct flow_match_basic match; in dpaa2_switch_flower_parse_key() local
39 flow_rule_match_basic(rule, &match); in dpaa2_switch_flower_parse_key()
40 acl_h->l3_protocol = match.key->ip_proto; in dpaa2_switch_flower_parse_key()
41 acl_h->l2_ether_type = be16_to_cpu(match.key->n_proto); in dpaa2_switch_flower_parse_key()
42 acl_m->l3_protocol = match.mask->ip_proto; in dpaa2_switch_flower_parse_key()
43 acl_m->l2_ether_type = be16_to_cpu(match.mask->n_proto); in dpaa2_switch_flower_parse_key()
47 struct flow_match_eth_addrs match; in dpaa2_switch_flower_parse_key() local
49 flow_rule_match_eth_addrs(rule, &match); in dpaa2_switch_flower_parse_key()
50 ether_addr_copy(acl_h->l2_dest_mac, &match.key->dst[0]); in dpaa2_switch_flower_parse_key()
51 ether_addr_copy(acl_h->l2_source_mac, &match.key->src[0]); in dpaa2_switch_flower_parse_key()
52 ether_addr_copy(acl_m->l2_dest_mac, &match.mask->dst[0]); in dpaa2_switch_flower_parse_key()
53 ether_addr_copy(acl_m->l2_source_mac, &match.mask->src[0]); in dpaa2_switch_flower_parse_key()
57 struct flow_match_vlan match; in dpaa2_switch_flower_parse_key() local
59 flow_rule_match_vlan(rule, &match); in dpaa2_switch_flower_parse_key()
60 acl_h->l2_vlan_id = match.key->vlan_id; in dpaa2_switch_flower_parse_key()
61 acl_h->l2_tpid = be16_to_cpu(match.key->vlan_tpid); in dpaa2_switch_flower_parse_key()
62 acl_h->l2_pcp_dei = match.key->vlan_priority << 1 | in dpaa2_switch_flower_parse_key()
63 match.key->vlan_dei; in dpaa2_switch_flower_parse_key()
65 acl_m->l2_vlan_id = match.mask->vlan_id; in dpaa2_switch_flower_parse_key()
66 acl_m->l2_tpid = be16_to_cpu(match.mask->vlan_tpid); in dpaa2_switch_flower_parse_key()
67 acl_m->l2_pcp_dei = match.mask->vlan_priority << 1 | in dpaa2_switch_flower_parse_key()
68 match.mask->vlan_dei; in dpaa2_switch_flower_parse_key()
72 struct flow_match_ipv4_addrs match; in dpaa2_switch_flower_parse_key() local
74 flow_rule_match_ipv4_addrs(rule, &match); in dpaa2_switch_flower_parse_key()
75 acl_h->l3_source_ip = be32_to_cpu(match.key->src); in dpaa2_switch_flower_parse_key()
76 acl_h->l3_dest_ip = be32_to_cpu(match.key->dst); in dpaa2_switch_flower_parse_key()
77 acl_m->l3_source_ip = be32_to_cpu(match.mask->src); in dpaa2_switch_flower_parse_key()
78 acl_m->l3_dest_ip = be32_to_cpu(match.mask->dst); in dpaa2_switch_flower_parse_key()
82 struct flow_match_ports match; in dpaa2_switch_flower_parse_key() local
84 flow_rule_match_ports(rule, &match); in dpaa2_switch_flower_parse_key()
85 acl_h->l4_source_port = be16_to_cpu(match.key->src); in dpaa2_switch_flower_parse_key()
86 acl_h->l4_dest_port = be16_to_cpu(match.key->dst); in dpaa2_switch_flower_parse_key()
87 acl_m->l4_source_port = be16_to_cpu(match.mask->src); in dpaa2_switch_flower_parse_key()
88 acl_m->l4_dest_port = be16_to_cpu(match.mask->dst); in dpaa2_switch_flower_parse_key()
92 struct flow_match_ip match; in dpaa2_switch_flower_parse_key() local
94 flow_rule_match_ip(rule, &match); in dpaa2_switch_flower_parse_key()
95 if (match.mask->ttl != 0) { in dpaa2_switch_flower_parse_key()
101 if ((match.mask->tos & 0x3) != 0) { in dpaa2_switch_flower_parse_key()
107 acl_h->l3_dscp = match.key->tos >> 2; in dpaa2_switch_flower_parse_key()
108 acl_m->l3_dscp = match.mask->tos >> 2; in dpaa2_switch_flower_parse_key()
537 struct flow_dissector *dissector = rule->match.dissector; in dpaa2_switch_flower_parse_mirror_key()
551 struct flow_match_vlan match; in dpaa2_switch_flower_parse_mirror_key() local
553 flow_rule_match_vlan(rule, &match); in dpaa2_switch_flower_parse_mirror_key()
555 if (match.mask->vlan_priority != 0 || in dpaa2_switch_flower_parse_mirror_key()
556 match.mask->vlan_dei != 0) { in dpaa2_switch_flower_parse_mirror_key()
562 if (match.mask->vlan_id != 0xFFF) { in dpaa2_switch_flower_parse_mirror_key()
568 *vlan = (u16)match.key->vlan_id; in dpaa2_switch_flower_parse_mirror_key()