Lines Matching full:match
577 struct flow_match_vlan match; in otx2_tc_process_vlan() local
581 flow_rule_match_cvlan(rule, &match); in otx2_tc_process_vlan()
583 flow_rule_match_vlan(rule, &match); in otx2_tc_process_vlan()
585 if (!eth_type_vlan(match.key->vlan_tpid)) { in otx2_tc_process_vlan()
587 ntohs(match.key->vlan_tpid)); in otx2_tc_process_vlan()
591 if (!match.mask->vlan_id) { in otx2_tc_process_vlan()
599 ntohs(match.key->vlan_tpid), match.key->vlan_id); in otx2_tc_process_vlan()
605 if (match.mask->vlan_id || in otx2_tc_process_vlan()
606 match.mask->vlan_dei || in otx2_tc_process_vlan()
607 match.mask->vlan_priority) { in otx2_tc_process_vlan()
608 vlan_tci = match.key->vlan_id | in otx2_tc_process_vlan()
609 match.key->vlan_dei << 12 | in otx2_tc_process_vlan()
610 match.key->vlan_priority << 13; in otx2_tc_process_vlan()
612 vlan_tci_mask = match.mask->vlan_id | in otx2_tc_process_vlan()
613 match.mask->vlan_dei << 12 | in otx2_tc_process_vlan()
614 match.mask->vlan_priority << 13; in otx2_tc_process_vlan()
641 dissector = rule->match.dissector; in otx2_tc_prepare_flow()
663 struct flow_match_basic match; in otx2_tc_prepare_flow() local
665 flow_rule_match_basic(rule, &match); in otx2_tc_prepare_flow()
668 flow_spec->etype = match.key->n_proto; in otx2_tc_prepare_flow()
669 flow_mask->etype = match.mask->n_proto; in otx2_tc_prepare_flow()
672 if (match.mask->ip_proto && in otx2_tc_prepare_flow()
673 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow()
674 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow()
675 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow()
676 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow()
677 match.key->ip_proto != IPPROTO_ESP && in otx2_tc_prepare_flow()
678 match.key->ip_proto != IPPROTO_AH && in otx2_tc_prepare_flow()
679 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow()
682 match.key->ip_proto); in otx2_tc_prepare_flow()
685 if (match.mask->ip_proto) in otx2_tc_prepare_flow()
686 ip_proto = match.key->ip_proto; in otx2_tc_prepare_flow()
705 struct flow_match_control match; in otx2_tc_prepare_flow() local
708 flow_rule_match_control(rule, &match); in otx2_tc_prepare_flow()
710 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { in otx2_tc_prepare_flow()
711 val = match.key->flags & FLOW_DIS_IS_FRAGMENT; in otx2_tc_prepare_flow()
728 match.mask->flags, extack)) in otx2_tc_prepare_flow()
733 struct flow_match_eth_addrs match; in otx2_tc_prepare_flow() local
735 flow_rule_match_eth_addrs(rule, &match); in otx2_tc_prepare_flow()
736 if (!is_zero_ether_addr(match.mask->src)) { in otx2_tc_prepare_flow()
737 NL_SET_ERR_MSG_MOD(extack, "src mac match not supported"); in otx2_tc_prepare_flow()
741 if (!is_zero_ether_addr(match.mask->dst)) { in otx2_tc_prepare_flow()
742 ether_addr_copy(flow_spec->dmac, (u8 *)&match.key->dst); in otx2_tc_prepare_flow()
744 (u8 *)&match.mask->dst); in otx2_tc_prepare_flow()
750 struct flow_match_ipsec match; in otx2_tc_prepare_flow() local
752 flow_rule_match_ipsec(rule, &match); in otx2_tc_prepare_flow()
753 if (!match.mask->spi) { in otx2_tc_prepare_flow()
764 flow_spec->spi = match.key->spi; in otx2_tc_prepare_flow()
765 flow_mask->spi = match.mask->spi; in otx2_tc_prepare_flow()
770 struct flow_match_ip match; in otx2_tc_prepare_flow() local
772 flow_rule_match_ip(rule, &match); in otx2_tc_prepare_flow()
774 match.mask->tos) { in otx2_tc_prepare_flow()
778 if (match.mask->ttl) { in otx2_tc_prepare_flow()
782 flow_spec->tos = match.key->tos; in otx2_tc_prepare_flow()
783 flow_mask->tos = match.mask->tos; in otx2_tc_prepare_flow()
804 struct flow_match_ipv4_addrs match; in otx2_tc_prepare_flow() local
806 flow_rule_match_ipv4_addrs(rule, &match); in otx2_tc_prepare_flow()
808 flow_spec->ip4dst = match.key->dst; in otx2_tc_prepare_flow()
809 flow_mask->ip4dst = match.mask->dst; in otx2_tc_prepare_flow()
812 flow_spec->ip4src = match.key->src; in otx2_tc_prepare_flow()
813 flow_mask->ip4src = match.mask->src; in otx2_tc_prepare_flow()
816 struct flow_match_ipv6_addrs match; in otx2_tc_prepare_flow() local
818 flow_rule_match_ipv6_addrs(rule, &match); in otx2_tc_prepare_flow()
820 if (ipv6_addr_loopback(&match.key->dst) || in otx2_tc_prepare_flow()
821 ipv6_addr_loopback(&match.key->src)) { in otx2_tc_prepare_flow()
827 if (!ipv6_addr_any(&match.mask->dst)) { in otx2_tc_prepare_flow()
829 (struct in6_addr *)&match.key->dst, in otx2_tc_prepare_flow()
832 (struct in6_addr *)&match.mask->dst, in otx2_tc_prepare_flow()
837 if (!ipv6_addr_any(&match.mask->src)) { in otx2_tc_prepare_flow()
839 (struct in6_addr *)&match.key->src, in otx2_tc_prepare_flow()
842 (struct in6_addr *)&match.mask->src, in otx2_tc_prepare_flow()
849 struct flow_match_ports match; in otx2_tc_prepare_flow() local
851 flow_rule_match_ports(rule, &match); in otx2_tc_prepare_flow()
853 flow_spec->dport = match.key->dst; in otx2_tc_prepare_flow()
854 flow_mask->dport = match.mask->dst; in otx2_tc_prepare_flow()
865 flow_spec->sport = match.key->src; in otx2_tc_prepare_flow()
866 flow_mask->sport = match.mask->src; in otx2_tc_prepare_flow()
879 struct flow_match_tcp match; in otx2_tc_prepare_flow() local
881 flow_rule_match_tcp(rule, &match); in otx2_tc_prepare_flow()
883 flow_spec->tcp_flags = match.key->flags; in otx2_tc_prepare_flow()
884 flow_mask->tcp_flags = match.mask->flags; in otx2_tc_prepare_flow()
889 struct flow_match_mpls match; in otx2_tc_prepare_flow() local
892 flow_rule_match_mpls(rule, &match); in otx2_tc_prepare_flow()
894 if (match.mask->used_lses & OTX2_UNSUPP_LSE_DEPTH) { in otx2_tc_prepare_flow()
896 "unsupported LSE depth for MPLS match offload"); in otx2_tc_prepare_flow()
900 for_each_set_bit(bit, (unsigned long *)&match.mask->used_lses, in otx2_tc_prepare_flow()
903 if (*((u32 *)&match.mask->ls[bit]) & in otx2_tc_prepare_flow()
915 match.key->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
917 match.key->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
919 match.key->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
923 match.mask->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
925 match.mask->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
927 match.mask->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
930 if (match.mask->ls[bit].mpls_ttl) { in otx2_tc_prepare_flow()
935 match.key->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
938 match.mask->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
944 struct flow_match_icmp match; in otx2_tc_prepare_flow() local
946 flow_rule_match_icmp(rule, &match); in otx2_tc_prepare_flow()
948 flow_spec->icmp_type = match.key->type; in otx2_tc_prepare_flow()
949 flow_mask->icmp_type = match.mask->type; in otx2_tc_prepare_flow()
952 flow_spec->icmp_code = match.key->code; in otx2_tc_prepare_flow()
953 flow_mask->icmp_code = match.mask->code; in otx2_tc_prepare_flow()