Lines Matching full:match

563 	struct flow_match_vlan match;  in otx2_tc_process_vlan()  local
567 flow_rule_match_cvlan(rule, &match); in otx2_tc_process_vlan()
569 flow_rule_match_vlan(rule, &match); in otx2_tc_process_vlan()
571 if (!eth_type_vlan(match.key->vlan_tpid)) { in otx2_tc_process_vlan()
573 ntohs(match.key->vlan_tpid)); in otx2_tc_process_vlan()
577 if (!match.mask->vlan_id) { in otx2_tc_process_vlan()
585 ntohs(match.key->vlan_tpid), match.key->vlan_id); in otx2_tc_process_vlan()
591 if (match.mask->vlan_id || in otx2_tc_process_vlan()
592 match.mask->vlan_dei || in otx2_tc_process_vlan()
593 match.mask->vlan_priority) { in otx2_tc_process_vlan()
594 vlan_tci = match.key->vlan_id | in otx2_tc_process_vlan()
595 match.key->vlan_dei << 12 | in otx2_tc_process_vlan()
596 match.key->vlan_priority << 13; in otx2_tc_process_vlan()
598 vlan_tci_mask = match.mask->vlan_id | in otx2_tc_process_vlan()
599 match.mask->vlan_dei << 12 | in otx2_tc_process_vlan()
600 match.mask->vlan_priority << 13; in otx2_tc_process_vlan()
627 dissector = rule->match.dissector; in otx2_tc_prepare_flow()
648 struct flow_match_basic match; in otx2_tc_prepare_flow() local
650 flow_rule_match_basic(rule, &match); in otx2_tc_prepare_flow()
653 flow_spec->etype = match.key->n_proto; in otx2_tc_prepare_flow()
654 flow_mask->etype = match.mask->n_proto; in otx2_tc_prepare_flow()
657 if (match.mask->ip_proto && in otx2_tc_prepare_flow()
658 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow()
659 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow()
660 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow()
661 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow()
662 match.key->ip_proto != IPPROTO_ESP && in otx2_tc_prepare_flow()
663 match.key->ip_proto != IPPROTO_AH && in otx2_tc_prepare_flow()
664 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow()
667 match.key->ip_proto); in otx2_tc_prepare_flow()
670 if (match.mask->ip_proto) in otx2_tc_prepare_flow()
671 ip_proto = match.key->ip_proto; in otx2_tc_prepare_flow()
690 struct flow_match_control match; in otx2_tc_prepare_flow() local
692 flow_rule_match_control(rule, &match); in otx2_tc_prepare_flow()
693 if (match.mask->flags & FLOW_DIS_FIRST_FRAG) { in otx2_tc_prepare_flow()
698 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { in otx2_tc_prepare_flow()
715 struct flow_match_eth_addrs match; in otx2_tc_prepare_flow() local
717 flow_rule_match_eth_addrs(rule, &match); in otx2_tc_prepare_flow()
718 if (!is_zero_ether_addr(match.mask->src)) { in otx2_tc_prepare_flow()
719 NL_SET_ERR_MSG_MOD(extack, "src mac match not supported"); in otx2_tc_prepare_flow()
723 if (!is_zero_ether_addr(match.mask->dst)) { in otx2_tc_prepare_flow()
724 ether_addr_copy(flow_spec->dmac, (u8 *)&match.key->dst); in otx2_tc_prepare_flow()
726 (u8 *)&match.mask->dst); in otx2_tc_prepare_flow()
732 struct flow_match_ipsec match; in otx2_tc_prepare_flow() local
734 flow_rule_match_ipsec(rule, &match); in otx2_tc_prepare_flow()
735 if (!match.mask->spi) { in otx2_tc_prepare_flow()
746 flow_spec->spi = match.key->spi; in otx2_tc_prepare_flow()
747 flow_mask->spi = match.mask->spi; in otx2_tc_prepare_flow()
752 struct flow_match_ip match; in otx2_tc_prepare_flow() local
754 flow_rule_match_ip(rule, &match); in otx2_tc_prepare_flow()
756 match.mask->tos) { in otx2_tc_prepare_flow()
760 if (match.mask->ttl) { in otx2_tc_prepare_flow()
764 flow_spec->tos = match.key->tos; in otx2_tc_prepare_flow()
765 flow_mask->tos = match.mask->tos; in otx2_tc_prepare_flow()
786 struct flow_match_ipv4_addrs match; in otx2_tc_prepare_flow() local
788 flow_rule_match_ipv4_addrs(rule, &match); in otx2_tc_prepare_flow()
790 flow_spec->ip4dst = match.key->dst; in otx2_tc_prepare_flow()
791 flow_mask->ip4dst = match.mask->dst; in otx2_tc_prepare_flow()
794 flow_spec->ip4src = match.key->src; in otx2_tc_prepare_flow()
795 flow_mask->ip4src = match.mask->src; in otx2_tc_prepare_flow()
798 struct flow_match_ipv6_addrs match; in otx2_tc_prepare_flow() local
800 flow_rule_match_ipv6_addrs(rule, &match); in otx2_tc_prepare_flow()
802 if (ipv6_addr_loopback(&match.key->dst) || in otx2_tc_prepare_flow()
803 ipv6_addr_loopback(&match.key->src)) { in otx2_tc_prepare_flow()
809 if (!ipv6_addr_any(&match.mask->dst)) { in otx2_tc_prepare_flow()
811 (struct in6_addr *)&match.key->dst, in otx2_tc_prepare_flow()
814 (struct in6_addr *)&match.mask->dst, in otx2_tc_prepare_flow()
819 if (!ipv6_addr_any(&match.mask->src)) { in otx2_tc_prepare_flow()
821 (struct in6_addr *)&match.key->src, in otx2_tc_prepare_flow()
824 (struct in6_addr *)&match.mask->src, in otx2_tc_prepare_flow()
831 struct flow_match_ports match; in otx2_tc_prepare_flow() local
833 flow_rule_match_ports(rule, &match); in otx2_tc_prepare_flow()
835 flow_spec->dport = match.key->dst; in otx2_tc_prepare_flow()
836 flow_mask->dport = match.mask->dst; in otx2_tc_prepare_flow()
847 flow_spec->sport = match.key->src; in otx2_tc_prepare_flow()
848 flow_mask->sport = match.mask->src; in otx2_tc_prepare_flow()
861 struct flow_match_mpls match; in otx2_tc_prepare_flow() local
864 flow_rule_match_mpls(rule, &match); in otx2_tc_prepare_flow()
866 if (match.mask->used_lses & OTX2_UNSUPP_LSE_DEPTH) { in otx2_tc_prepare_flow()
868 "unsupported LSE depth for MPLS match offload"); in otx2_tc_prepare_flow()
872 for_each_set_bit(bit, (unsigned long *)&match.mask->used_lses, in otx2_tc_prepare_flow()
875 if (*((u32 *)&match.mask->ls[bit]) & in otx2_tc_prepare_flow()
887 match.key->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
889 match.key->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
891 match.key->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
895 match.mask->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
897 match.mask->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
899 match.mask->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
902 if (match.mask->ls[bit].mpls_ttl) { in otx2_tc_prepare_flow()
907 match.key->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
910 match.mask->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
916 struct flow_match_icmp match; in otx2_tc_prepare_flow() local
918 flow_rule_match_icmp(rule, &match); in otx2_tc_prepare_flow()
920 flow_spec->icmp_type = match.key->type; in otx2_tc_prepare_flow()
921 flow_mask->icmp_type = match.mask->type; in otx2_tc_prepare_flow()
924 flow_spec->icmp_code = match.key->code; in otx2_tc_prepare_flow()
925 flow_mask->icmp_code = match.mask->code; in otx2_tc_prepare_flow()