Lines Matching refs:match

483 	dissector = rule->match.dissector;  in otx2_tc_prepare_flow()
500 struct flow_match_basic match; in otx2_tc_prepare_flow() local
502 flow_rule_match_basic(rule, &match); in otx2_tc_prepare_flow()
505 flow_spec->etype = match.key->n_proto; in otx2_tc_prepare_flow()
506 flow_mask->etype = match.mask->n_proto; in otx2_tc_prepare_flow()
509 if (match.mask->ip_proto && in otx2_tc_prepare_flow()
510 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow()
511 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow()
512 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow()
513 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow()
514 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow()
517 match.key->ip_proto); in otx2_tc_prepare_flow()
520 if (match.mask->ip_proto) in otx2_tc_prepare_flow()
521 ip_proto = match.key->ip_proto; in otx2_tc_prepare_flow()
536 struct flow_match_eth_addrs match; in otx2_tc_prepare_flow() local
538 flow_rule_match_eth_addrs(rule, &match); in otx2_tc_prepare_flow()
539 if (!is_zero_ether_addr(match.mask->src)) { in otx2_tc_prepare_flow()
544 if (!is_zero_ether_addr(match.mask->dst)) { in otx2_tc_prepare_flow()
545 ether_addr_copy(flow_spec->dmac, (u8 *)&match.key->dst); in otx2_tc_prepare_flow()
547 (u8 *)&match.mask->dst); in otx2_tc_prepare_flow()
553 struct flow_match_ip match; in otx2_tc_prepare_flow() local
555 flow_rule_match_ip(rule, &match); in otx2_tc_prepare_flow()
557 match.mask->tos) { in otx2_tc_prepare_flow()
561 if (match.mask->ttl) { in otx2_tc_prepare_flow()
565 flow_spec->tos = match.key->tos; in otx2_tc_prepare_flow()
566 flow_mask->tos = match.mask->tos; in otx2_tc_prepare_flow()
571 struct flow_match_vlan match; in otx2_tc_prepare_flow() local
574 flow_rule_match_vlan(rule, &match); in otx2_tc_prepare_flow()
576 if (ntohs(match.key->vlan_tpid) != ETH_P_8021Q) { in otx2_tc_prepare_flow()
578 ntohs(match.key->vlan_tpid)); in otx2_tc_prepare_flow()
582 if (match.mask->vlan_id || in otx2_tc_prepare_flow()
583 match.mask->vlan_dei || in otx2_tc_prepare_flow()
584 match.mask->vlan_priority) { in otx2_tc_prepare_flow()
585 vlan_tci = match.key->vlan_id | in otx2_tc_prepare_flow()
586 match.key->vlan_dei << 12 | in otx2_tc_prepare_flow()
587 match.key->vlan_priority << 13; in otx2_tc_prepare_flow()
589 vlan_tci_mask = match.mask->vlan_id | in otx2_tc_prepare_flow()
590 match.mask->vlan_dei << 12 | in otx2_tc_prepare_flow()
591 match.mask->vlan_priority << 13; in otx2_tc_prepare_flow()
600 struct flow_match_ipv4_addrs match; in otx2_tc_prepare_flow() local
602 flow_rule_match_ipv4_addrs(rule, &match); in otx2_tc_prepare_flow()
604 flow_spec->ip4dst = match.key->dst; in otx2_tc_prepare_flow()
605 flow_mask->ip4dst = match.mask->dst; in otx2_tc_prepare_flow()
608 flow_spec->ip4src = match.key->src; in otx2_tc_prepare_flow()
609 flow_mask->ip4src = match.mask->src; in otx2_tc_prepare_flow()
612 struct flow_match_ipv6_addrs match; in otx2_tc_prepare_flow() local
614 flow_rule_match_ipv6_addrs(rule, &match); in otx2_tc_prepare_flow()
616 if (ipv6_addr_loopback(&match.key->dst) || in otx2_tc_prepare_flow()
617 ipv6_addr_loopback(&match.key->src)) { in otx2_tc_prepare_flow()
623 if (!ipv6_addr_any(&match.mask->dst)) { in otx2_tc_prepare_flow()
625 (struct in6_addr *)&match.key->dst, in otx2_tc_prepare_flow()
628 (struct in6_addr *)&match.mask->dst, in otx2_tc_prepare_flow()
633 if (!ipv6_addr_any(&match.mask->src)) { in otx2_tc_prepare_flow()
635 (struct in6_addr *)&match.key->src, in otx2_tc_prepare_flow()
638 (struct in6_addr *)&match.mask->src, in otx2_tc_prepare_flow()
645 struct flow_match_ports match; in otx2_tc_prepare_flow() local
647 flow_rule_match_ports(rule, &match); in otx2_tc_prepare_flow()
649 flow_spec->dport = match.key->dst; in otx2_tc_prepare_flow()
650 flow_mask->dport = match.mask->dst; in otx2_tc_prepare_flow()
661 flow_spec->sport = match.key->src; in otx2_tc_prepare_flow()
662 flow_mask->sport = match.mask->src; in otx2_tc_prepare_flow()