Lines Matching full: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()
151 if (match.mask->ingress_ifindex != 0xFFFFFFFF) { in prestera_flower_parse_meta()
158 match.key->ingress_ifindex); in prestera_flower_parse_meta()
161 "Can't find specified ingress port to match on"); in prestera_flower_parse_meta()
167 "Can't match on switchdev ingress port"); in prestera_flower_parse_meta()
190 struct flow_dissector *dissector = f_rule->match.dissector; in prestera_flower_parse()
191 struct prestera_acl_match *r_match = &rule->re_key.match; in prestera_flower_parse()
222 struct flow_match_control match; in prestera_flower_parse() local
224 flow_rule_match_control(f_rule, &match); in prestera_flower_parse()
225 addr_type = match.key->addr_type; in prestera_flower_parse()
229 struct flow_match_basic match; in prestera_flower_parse() local
231 flow_rule_match_basic(f_rule, &match); in prestera_flower_parse()
232 n_proto_key = match.key->n_proto; in prestera_flower_parse()
233 n_proto_mask = match.mask->n_proto; in prestera_flower_parse()
235 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse()
243 rule_match_set(r_match->key, IP_PROTO, match.key->ip_proto); in prestera_flower_parse()
244 rule_match_set(r_match->mask, IP_PROTO, match.mask->ip_proto); in prestera_flower_parse()
245 ip_proto = match.key->ip_proto; in prestera_flower_parse()
249 struct flow_match_eth_addrs match; in prestera_flower_parse() local
251 flow_rule_match_eth_addrs(f_rule, &match); in prestera_flower_parse()
255 ETH_DMAC_0, &match.key->dst[0], 4); in prestera_flower_parse()
257 ETH_DMAC_1, &match.key->dst[4], 2); in prestera_flower_parse()
260 ETH_DMAC_0, &match.mask->dst[0], 4); in prestera_flower_parse()
262 ETH_DMAC_1, &match.mask->dst[4], 2); in prestera_flower_parse()
266 ETH_SMAC_0, &match.key->src[0], 4); in prestera_flower_parse()
268 ETH_SMAC_1, &match.key->src[4], 2); in prestera_flower_parse()
271 ETH_SMAC_0, &match.mask->src[0], 4); in prestera_flower_parse()
273 ETH_SMAC_1, &match.mask->src[4], 2); in prestera_flower_parse()
277 struct flow_match_ipv4_addrs match; in prestera_flower_parse() local
279 flow_rule_match_ipv4_addrs(f_rule, &match); in prestera_flower_parse()
281 rule_match_set(r_match->key, IP_SRC, match.key->src); in prestera_flower_parse()
282 rule_match_set(r_match->mask, IP_SRC, match.mask->src); in prestera_flower_parse()
284 rule_match_set(r_match->key, IP_DST, match.key->dst); in prestera_flower_parse()
285 rule_match_set(r_match->mask, IP_DST, match.mask->dst); in prestera_flower_parse()
289 struct flow_match_ports match; in prestera_flower_parse() local
298 flow_rule_match_ports(f_rule, &match); in prestera_flower_parse()
300 rule_match_set(r_match->key, L4_PORT_SRC, match.key->src); in prestera_flower_parse()
301 rule_match_set(r_match->mask, L4_PORT_SRC, match.mask->src); in prestera_flower_parse()
303 rule_match_set(r_match->key, L4_PORT_DST, match.key->dst); in prestera_flower_parse()
304 rule_match_set(r_match->mask, L4_PORT_DST, match.mask->dst); in prestera_flower_parse()
308 struct flow_match_ports_range match; in prestera_flower_parse() local
311 flow_rule_match_ports_range(f_rule, &match); in prestera_flower_parse()
314 tp_key = htonl(ntohs(match.key->tp_min.src) | in prestera_flower_parse()
315 (ntohs(match.key->tp_max.src) << 16)); in prestera_flower_parse()
316 tp_mask = htonl(ntohs(match.mask->tp_min.src) | in prestera_flower_parse()
317 (ntohs(match.mask->tp_max.src) << 16)); in prestera_flower_parse()
322 tp_key = htonl(ntohs(match.key->tp_min.dst) | in prestera_flower_parse()
323 (ntohs(match.key->tp_max.dst) << 16)); in prestera_flower_parse()
324 tp_mask = htonl(ntohs(match.mask->tp_min.dst) | in prestera_flower_parse()
325 (ntohs(match.mask->tp_max.dst) << 16)); in prestera_flower_parse()
331 struct flow_match_vlan match; in prestera_flower_parse() local
333 flow_rule_match_vlan(f_rule, &match); in prestera_flower_parse()
335 if (match.mask->vlan_id != 0) { in prestera_flower_parse()
336 __be16 key = cpu_to_be16(match.key->vlan_id); in prestera_flower_parse()
337 __be16 mask = cpu_to_be16(match.mask->vlan_id); in prestera_flower_parse()
343 rule_match_set(r_match->key, VLAN_TPID, match.key->vlan_tpid); in prestera_flower_parse()
344 rule_match_set(r_match->mask, VLAN_TPID, match.mask->vlan_tpid); in prestera_flower_parse()
348 struct flow_match_icmp match; in prestera_flower_parse() local
350 flow_rule_match_icmp(f_rule, &match); in prestera_flower_parse()
352 rule_match_set(r_match->key, ICMP_TYPE, match.key->type); in prestera_flower_parse()
353 rule_match_set(r_match->mask, ICMP_TYPE, match.mask->type); in prestera_flower_parse()
355 rule_match_set(r_match->key, ICMP_CODE, match.key->code); in prestera_flower_parse()
356 rule_match_set(r_match->mask, ICMP_CODE, match.mask->code); in prestera_flower_parse()
503 err = prestera_acl_ruleset_keymask_set(ruleset, rule.re_key.match.mask); in prestera_flower_tmplt_create()