Lines Matching full:match
307 const struct flow_match_meta *match,
313 if (!match->mask->ingress_ifindex)
316 if (match->mask->ingress_ifindex != 0xFFFFFFFF) {
322 match->key->ingress_ifindex);
324 NL_SET_ERR_MSG_MOD(extack, "Can't find specified ingress port to match on");
329 NL_SET_ERR_MSG_MOD(extack, "Can't match on non-mlxsw ingress port");
335 NL_SET_ERR_MSG_MOD(extack, "Can't match on a port from different device");
352 struct flow_match_meta match;
357 flow_rule_match_meta(rule, &match);
360 match.key->l2_miss, match.mask->l2_miss);
362 return mlxsw_sp_flower_parse_meta_iif(rulei, block, &match,
369 struct flow_match_ipv4_addrs match;
371 flow_rule_match_ipv4_addrs(f->rule, &match);
374 (char *) &match.key->src,
375 (char *) &match.mask->src, 4);
377 (char *) &match.key->dst,
378 (char *) &match.mask->dst, 4);
384 struct flow_match_ipv6_addrs match;
386 flow_rule_match_ipv6_addrs(f->rule, &match);
389 &match.key->src.s6_addr[0x0],
390 &match.mask->src.s6_addr[0x0], 4);
392 &match.key->src.s6_addr[0x4],
393 &match.mask->src.s6_addr[0x4], 4);
395 &match.key->src.s6_addr[0x8],
396 &match.mask->src.s6_addr[0x8], 4);
398 &match.key->src.s6_addr[0xC],
399 &match.mask->src.s6_addr[0xC], 4);
401 &match.key->dst.s6_addr[0x0],
402 &match.mask->dst.s6_addr[0x0], 4);
404 &match.key->dst.s6_addr[0x4],
405 &match.mask->dst.s6_addr[0x4], 4);
407 &match.key->dst.s6_addr[0x8],
408 &match.mask->dst.s6_addr[0x8], 4);
410 &match.key->dst.s6_addr[0xC],
411 &match.mask->dst.s6_addr[0xC], 4);
420 struct flow_match_ports match;
431 flow_rule_match_ports(rule, &match);
433 ntohs(match.key->dst),
434 ntohs(match.mask->dst));
436 ntohs(match.key->src),
437 ntohs(match.mask->src));
447 struct flow_match_ports_range match;
458 flow_rule_match_ports_range(rule, &match);
460 if (match.mask->tp_min.src) {
462 .min = ntohs(match.key->tp_min.src),
463 .max = ntohs(match.key->tp_max.src),
479 if (match.mask->tp_min.dst) {
481 .min = ntohs(match.key->tp_min.dst),
482 .max = ntohs(match.key->tp_max.dst),
509 struct flow_match_tcp match;
520 flow_rule_match_tcp(rule, &match);
522 if (match.mask->flags & htons(0x0E00)) {
523 NL_SET_ERR_MSG_MOD(f->common.extack, "TCP flags match not supported on reserved bits");
524 dev_err(mlxsw_sp->bus_info->dev, "TCP flags match not supported on reserved bits\n");
529 ntohs(match.key->flags),
530 ntohs(match.mask->flags));
540 struct flow_match_ip match;
551 flow_rule_match_ip(rule, &match);
554 match.key->ttl, match.mask->ttl);
557 match.key->tos & 0x3,
558 match.mask->tos & 0x3);
561 match.key->tos >> 2,
562 match.mask->tos >> 2);
573 struct flow_dissector *dissector = rule->match.dissector;
604 struct flow_match_control match;
606 flow_rule_match_control(rule, &match);
607 addr_type = match.key->addr_type;
609 if (flow_rule_has_control_flags(match.mask->flags,
615 struct flow_match_basic match;
617 flow_rule_match_basic(rule, &match);
618 n_proto_key = ntohs(match.key->n_proto);
619 n_proto_mask = ntohs(match.mask->n_proto);
629 ip_proto = match.key->ip_proto;
632 match.key->ip_proto,
633 match.mask->ip_proto);
637 struct flow_match_eth_addrs match;
639 flow_rule_match_eth_addrs(rule, &match);
642 match.key->dst,
643 match.mask->dst, 2);
646 match.key->dst + 2,
647 match.mask->dst + 2, 4);
650 match.key->src,
651 match.mask->src, 2);
654 match.key->src + 2,
655 match.mask->src + 2, 4);
659 struct flow_match_vlan match;
661 flow_rule_match_vlan(rule, &match);
663 match.mask->vlan_id) {
673 if (match.mask->vlan_id != 0)
676 match.key->vlan_id,
677 match.mask->vlan_id);
678 if (match.mask->vlan_priority != 0)
681 match.key->vlan_priority,
682 match.mask->vlan_priority);