Lines Matching refs:match
15 struct flow_dissector *dissector = rule->match.dissector;
33 acl_h = &acl_key->match;
40 struct flow_match_basic match;
42 flow_rule_match_basic(rule, &match);
43 acl_h->l3_protocol = match.key->ip_proto;
44 acl_h->l2_ether_type = be16_to_cpu(match.key->n_proto);
45 acl_m->l3_protocol = match.mask->ip_proto;
46 acl_m->l2_ether_type = be16_to_cpu(match.mask->n_proto);
50 struct flow_match_eth_addrs match;
52 flow_rule_match_eth_addrs(rule, &match);
53 ether_addr_copy(acl_h->l2_dest_mac, &match.key->dst[0]);
54 ether_addr_copy(acl_h->l2_source_mac, &match.key->src[0]);
55 ether_addr_copy(acl_m->l2_dest_mac, &match.mask->dst[0]);
56 ether_addr_copy(acl_m->l2_source_mac, &match.mask->src[0]);
60 struct flow_match_vlan match;
62 flow_rule_match_vlan(rule, &match);
63 acl_h->l2_vlan_id = match.key->vlan_id;
64 acl_h->l2_tpid = be16_to_cpu(match.key->vlan_tpid);
65 acl_h->l2_pcp_dei = match.key->vlan_priority << 1 |
66 match.key->vlan_dei;
68 acl_m->l2_vlan_id = match.mask->vlan_id;
69 acl_m->l2_tpid = be16_to_cpu(match.mask->vlan_tpid);
70 acl_m->l2_pcp_dei = match.mask->vlan_priority << 1 |
71 match.mask->vlan_dei;
75 struct flow_match_ipv4_addrs match;
77 flow_rule_match_ipv4_addrs(rule, &match);
78 acl_h->l3_source_ip = be32_to_cpu(match.key->src);
79 acl_h->l3_dest_ip = be32_to_cpu(match.key->dst);
80 acl_m->l3_source_ip = be32_to_cpu(match.mask->src);
81 acl_m->l3_dest_ip = be32_to_cpu(match.mask->dst);
85 struct flow_match_ports match;
87 flow_rule_match_ports(rule, &match);
88 acl_h->l4_source_port = be16_to_cpu(match.key->src);
89 acl_h->l4_dest_port = be16_to_cpu(match.key->dst);
90 acl_m->l4_source_port = be16_to_cpu(match.mask->src);
91 acl_m->l4_dest_port = be16_to_cpu(match.mask->dst);
95 struct flow_match_ip match;
97 flow_rule_match_ip(rule, &match);
98 if (match.mask->ttl != 0) {
104 if ((match.mask->tos & 0x3) != 0) {
110 acl_h->l3_dscp = match.key->tos >> 2;
111 acl_m->l3_dscp = match.mask->tos >> 2;
541 struct flow_dissector *dissector = rule->match.dissector;
558 struct flow_match_vlan match;
560 flow_rule_match_vlan(rule, &match);
562 if (match.mask->vlan_priority != 0 ||
563 match.mask->vlan_dei != 0) {
569 if (match.mask->vlan_id != 0xFFF) {
575 *vlan = (u16)match.key->vlan_id;