Lines Matching refs:match
144 struct prestera_acl_match *r_match = &rule->re_key.match; in prestera_flower_parse_meta()
147 struct flow_match_meta match; in prestera_flower_parse_meta() local
150 flow_rule_match_meta(f_rule, &match); in prestera_flower_parse_meta()
152 if (match.mask->l2_miss) { in prestera_flower_parse_meta()
157 if (match.mask->ingress_ifindex != 0xFFFFFFFF) { in prestera_flower_parse_meta()
164 match.key->ingress_ifindex); in prestera_flower_parse_meta()
196 struct flow_dissector *dissector = f_rule->match.dissector; in prestera_flower_parse()
197 struct prestera_acl_match *r_match = &rule->re_key.match; in prestera_flower_parse()
228 struct flow_match_control match; in prestera_flower_parse() local
230 flow_rule_match_control(f_rule, &match); in prestera_flower_parse()
231 addr_type = match.key->addr_type; in prestera_flower_parse()
235 struct flow_match_basic match; in prestera_flower_parse() local
237 flow_rule_match_basic(f_rule, &match); in prestera_flower_parse()
238 n_proto_key = match.key->n_proto; in prestera_flower_parse()
239 n_proto_mask = match.mask->n_proto; in prestera_flower_parse()
241 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse()
249 rule_match_set(r_match->key, IP_PROTO, match.key->ip_proto); in prestera_flower_parse()
250 rule_match_set(r_match->mask, IP_PROTO, match.mask->ip_proto); in prestera_flower_parse()
251 ip_proto = match.key->ip_proto; in prestera_flower_parse()
255 struct flow_match_eth_addrs match; in prestera_flower_parse() local
257 flow_rule_match_eth_addrs(f_rule, &match); in prestera_flower_parse()
261 ETH_DMAC_0, &match.key->dst[0], 4); in prestera_flower_parse()
263 ETH_DMAC_1, &match.key->dst[4], 2); in prestera_flower_parse()
266 ETH_DMAC_0, &match.mask->dst[0], 4); in prestera_flower_parse()
268 ETH_DMAC_1, &match.mask->dst[4], 2); in prestera_flower_parse()
272 ETH_SMAC_0, &match.key->src[0], 4); in prestera_flower_parse()
274 ETH_SMAC_1, &match.key->src[4], 2); in prestera_flower_parse()
277 ETH_SMAC_0, &match.mask->src[0], 4); in prestera_flower_parse()
279 ETH_SMAC_1, &match.mask->src[4], 2); in prestera_flower_parse()
283 struct flow_match_ipv4_addrs match; in prestera_flower_parse() local
285 flow_rule_match_ipv4_addrs(f_rule, &match); in prestera_flower_parse()
287 rule_match_set(r_match->key, IP_SRC, match.key->src); in prestera_flower_parse()
288 rule_match_set(r_match->mask, IP_SRC, match.mask->src); in prestera_flower_parse()
290 rule_match_set(r_match->key, IP_DST, match.key->dst); in prestera_flower_parse()
291 rule_match_set(r_match->mask, IP_DST, match.mask->dst); in prestera_flower_parse()
295 struct flow_match_ports match; in prestera_flower_parse() local
304 flow_rule_match_ports(f_rule, &match); in prestera_flower_parse()
306 rule_match_set(r_match->key, L4_PORT_SRC, match.key->src); in prestera_flower_parse()
307 rule_match_set(r_match->mask, L4_PORT_SRC, match.mask->src); in prestera_flower_parse()
309 rule_match_set(r_match->key, L4_PORT_DST, match.key->dst); in prestera_flower_parse()
310 rule_match_set(r_match->mask, L4_PORT_DST, match.mask->dst); in prestera_flower_parse()
314 struct flow_match_ports_range match; in prestera_flower_parse() local
317 flow_rule_match_ports_range(f_rule, &match); in prestera_flower_parse()
320 tp_key = htonl(ntohs(match.key->tp_min.src) | in prestera_flower_parse()
321 (ntohs(match.key->tp_max.src) << 16)); in prestera_flower_parse()
322 tp_mask = htonl(ntohs(match.mask->tp_min.src) | in prestera_flower_parse()
323 (ntohs(match.mask->tp_max.src) << 16)); in prestera_flower_parse()
328 tp_key = htonl(ntohs(match.key->tp_min.dst) | in prestera_flower_parse()
329 (ntohs(match.key->tp_max.dst) << 16)); in prestera_flower_parse()
330 tp_mask = htonl(ntohs(match.mask->tp_min.dst) | in prestera_flower_parse()
331 (ntohs(match.mask->tp_max.dst) << 16)); in prestera_flower_parse()
337 struct flow_match_vlan match; in prestera_flower_parse() local
339 flow_rule_match_vlan(f_rule, &match); in prestera_flower_parse()
341 if (match.mask->vlan_id != 0) { in prestera_flower_parse()
342 __be16 key = cpu_to_be16(match.key->vlan_id); in prestera_flower_parse()
343 __be16 mask = cpu_to_be16(match.mask->vlan_id); in prestera_flower_parse()
349 rule_match_set(r_match->key, VLAN_TPID, match.key->vlan_tpid); in prestera_flower_parse()
350 rule_match_set(r_match->mask, VLAN_TPID, match.mask->vlan_tpid); in prestera_flower_parse()
354 struct flow_match_icmp match; in prestera_flower_parse() local
356 flow_rule_match_icmp(f_rule, &match); in prestera_flower_parse()
358 rule_match_set(r_match->key, ICMP_TYPE, match.key->type); in prestera_flower_parse()
359 rule_match_set(r_match->mask, ICMP_TYPE, match.mask->type); in prestera_flower_parse()
361 rule_match_set(r_match->key, ICMP_CODE, match.key->code); in prestera_flower_parse()
362 rule_match_set(r_match->mask, ICMP_CODE, match.mask->code); in prestera_flower_parse()
509 err = prestera_acl_ruleset_keymask_set(ruleset, rule.re_key.match.mask); in prestera_flower_tmplt_create()