Lines Matching full:match

246 	struct flow_match_meta match;  in mlxsw_sp_flower_parse_meta()  local
251 flow_rule_match_meta(rule, &match); in mlxsw_sp_flower_parse_meta()
252 if (match.mask->ingress_ifindex != 0xFFFFFFFF) { in mlxsw_sp_flower_parse_meta()
258 match.key->ingress_ifindex); in mlxsw_sp_flower_parse_meta()
260 NL_SET_ERR_MSG_MOD(f->common.extack, "Can't find specified ingress port to match on"); in mlxsw_sp_flower_parse_meta()
265 NL_SET_ERR_MSG_MOD(f->common.extack, "Can't match on non-mlxsw ingress port"); in mlxsw_sp_flower_parse_meta()
271 NL_SET_ERR_MSG_MOD(f->common.extack, "Can't match on a port from different device"); in mlxsw_sp_flower_parse_meta()
285 struct flow_match_ipv4_addrs match; in mlxsw_sp_flower_parse_ipv4() local
287 flow_rule_match_ipv4_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv4()
290 (char *) &match.key->src, in mlxsw_sp_flower_parse_ipv4()
291 (char *) &match.mask->src, 4); in mlxsw_sp_flower_parse_ipv4()
293 (char *) &match.key->dst, in mlxsw_sp_flower_parse_ipv4()
294 (char *) &match.mask->dst, 4); in mlxsw_sp_flower_parse_ipv4()
300 struct flow_match_ipv6_addrs match; in mlxsw_sp_flower_parse_ipv6() local
302 flow_rule_match_ipv6_addrs(f->rule, &match); in mlxsw_sp_flower_parse_ipv6()
305 &match.key->src.s6_addr[0x0], in mlxsw_sp_flower_parse_ipv6()
306 &match.mask->src.s6_addr[0x0], 4); in mlxsw_sp_flower_parse_ipv6()
308 &match.key->src.s6_addr[0x4], in mlxsw_sp_flower_parse_ipv6()
309 &match.mask->src.s6_addr[0x4], 4); in mlxsw_sp_flower_parse_ipv6()
311 &match.key->src.s6_addr[0x8], in mlxsw_sp_flower_parse_ipv6()
312 &match.mask->src.s6_addr[0x8], 4); in mlxsw_sp_flower_parse_ipv6()
314 &match.key->src.s6_addr[0xC], in mlxsw_sp_flower_parse_ipv6()
315 &match.mask->src.s6_addr[0xC], 4); in mlxsw_sp_flower_parse_ipv6()
317 &match.key->dst.s6_addr[0x0], in mlxsw_sp_flower_parse_ipv6()
318 &match.mask->dst.s6_addr[0x0], 4); in mlxsw_sp_flower_parse_ipv6()
320 &match.key->dst.s6_addr[0x4], in mlxsw_sp_flower_parse_ipv6()
321 &match.mask->dst.s6_addr[0x4], 4); in mlxsw_sp_flower_parse_ipv6()
323 &match.key->dst.s6_addr[0x8], in mlxsw_sp_flower_parse_ipv6()
324 &match.mask->dst.s6_addr[0x8], 4); in mlxsw_sp_flower_parse_ipv6()
326 &match.key->dst.s6_addr[0xC], in mlxsw_sp_flower_parse_ipv6()
327 &match.mask->dst.s6_addr[0xC], 4); in mlxsw_sp_flower_parse_ipv6()
336 struct flow_match_ports match; in mlxsw_sp_flower_parse_ports() local
347 flow_rule_match_ports(rule, &match); in mlxsw_sp_flower_parse_ports()
349 ntohs(match.key->dst), in mlxsw_sp_flower_parse_ports()
350 ntohs(match.mask->dst)); in mlxsw_sp_flower_parse_ports()
352 ntohs(match.key->src), in mlxsw_sp_flower_parse_ports()
353 ntohs(match.mask->src)); in mlxsw_sp_flower_parse_ports()
363 struct flow_match_tcp match; in mlxsw_sp_flower_parse_tcp() local
374 flow_rule_match_tcp(rule, &match); in mlxsw_sp_flower_parse_tcp()
376 if (match.mask->flags & htons(0x0E00)) { in mlxsw_sp_flower_parse_tcp()
377 NL_SET_ERR_MSG_MOD(f->common.extack, "TCP flags match not supported on reserved bits"); in mlxsw_sp_flower_parse_tcp()
378 dev_err(mlxsw_sp->bus_info->dev, "TCP flags match not supported on reserved bits\n"); in mlxsw_sp_flower_parse_tcp()
383 ntohs(match.key->flags), in mlxsw_sp_flower_parse_tcp()
384 ntohs(match.mask->flags)); in mlxsw_sp_flower_parse_tcp()
394 struct flow_match_ip match; in mlxsw_sp_flower_parse_ip() local
405 flow_rule_match_ip(rule, &match); in mlxsw_sp_flower_parse_ip()
408 match.key->ttl, match.mask->ttl); in mlxsw_sp_flower_parse_ip()
411 match.key->tos & 0x3, in mlxsw_sp_flower_parse_ip()
412 match.mask->tos & 0x3); in mlxsw_sp_flower_parse_ip()
415 match.key->tos >> 2, in mlxsw_sp_flower_parse_ip()
416 match.mask->tos >> 2); in mlxsw_sp_flower_parse_ip()
427 struct flow_dissector *dissector = rule->match.dissector; in mlxsw_sp_flower_parse()
457 struct flow_match_control match; in mlxsw_sp_flower_parse() local
459 flow_rule_match_control(rule, &match); in mlxsw_sp_flower_parse()
460 addr_type = match.key->addr_type; in mlxsw_sp_flower_parse()
464 struct flow_match_basic match; in mlxsw_sp_flower_parse() local
466 flow_rule_match_basic(rule, &match); in mlxsw_sp_flower_parse()
467 n_proto_key = ntohs(match.key->n_proto); in mlxsw_sp_flower_parse()
468 n_proto_mask = ntohs(match.mask->n_proto); in mlxsw_sp_flower_parse()
478 ip_proto = match.key->ip_proto; in mlxsw_sp_flower_parse()
481 match.key->ip_proto, in mlxsw_sp_flower_parse()
482 match.mask->ip_proto); in mlxsw_sp_flower_parse()
486 struct flow_match_eth_addrs match; in mlxsw_sp_flower_parse() local
488 flow_rule_match_eth_addrs(rule, &match); in mlxsw_sp_flower_parse()
491 match.key->dst, in mlxsw_sp_flower_parse()
492 match.mask->dst, 2); in mlxsw_sp_flower_parse()
495 match.key->dst + 2, in mlxsw_sp_flower_parse()
496 match.mask->dst + 2, 4); in mlxsw_sp_flower_parse()
499 match.key->src, in mlxsw_sp_flower_parse()
500 match.mask->src, 2); in mlxsw_sp_flower_parse()
503 match.key->src + 2, in mlxsw_sp_flower_parse()
504 match.mask->src + 2, 4); in mlxsw_sp_flower_parse()
508 struct flow_match_vlan match; in mlxsw_sp_flower_parse() local
510 flow_rule_match_vlan(rule, &match); in mlxsw_sp_flower_parse()
521 if (match.mask->vlan_id != 0) in mlxsw_sp_flower_parse()
524 match.key->vlan_id, in mlxsw_sp_flower_parse()
525 match.mask->vlan_id); in mlxsw_sp_flower_parse()
526 if (match.mask->vlan_priority != 0) in mlxsw_sp_flower_parse()
529 match.key->vlan_priority, in mlxsw_sp_flower_parse()
530 match.mask->vlan_priority); in mlxsw_sp_flower_parse()