Lines Matching full:match
571 struct flow_match_vlan match; in otx2_tc_process_vlan() local
575 flow_rule_match_cvlan(rule, &match); in otx2_tc_process_vlan()
577 flow_rule_match_vlan(rule, &match); in otx2_tc_process_vlan()
579 if (!eth_type_vlan(match.key->vlan_tpid)) { in otx2_tc_process_vlan()
581 ntohs(match.key->vlan_tpid)); in otx2_tc_process_vlan()
585 if (!match.mask->vlan_id) { in otx2_tc_process_vlan()
593 ntohs(match.key->vlan_tpid), match.key->vlan_id); in otx2_tc_process_vlan()
599 if (match.mask->vlan_id || in otx2_tc_process_vlan()
600 match.mask->vlan_dei || in otx2_tc_process_vlan()
601 match.mask->vlan_priority) { in otx2_tc_process_vlan()
602 vlan_tci = match.key->vlan_id | in otx2_tc_process_vlan()
603 match.key->vlan_dei << 12 | in otx2_tc_process_vlan()
604 match.key->vlan_priority << 13; in otx2_tc_process_vlan()
606 vlan_tci_mask = match.mask->vlan_id | in otx2_tc_process_vlan()
607 match.mask->vlan_dei << 12 | in otx2_tc_process_vlan()
608 match.mask->vlan_priority << 13; in otx2_tc_process_vlan()
635 dissector = rule->match.dissector; in otx2_tc_prepare_flow()
657 struct flow_match_basic match; in otx2_tc_prepare_flow() local
659 flow_rule_match_basic(rule, &match); in otx2_tc_prepare_flow()
662 flow_spec->etype = match.key->n_proto; in otx2_tc_prepare_flow()
663 flow_mask->etype = match.mask->n_proto; in otx2_tc_prepare_flow()
666 if (match.mask->ip_proto && in otx2_tc_prepare_flow()
667 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow()
668 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow()
669 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow()
670 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow()
671 match.key->ip_proto != IPPROTO_ESP && in otx2_tc_prepare_flow()
672 match.key->ip_proto != IPPROTO_AH && in otx2_tc_prepare_flow()
673 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow()
676 match.key->ip_proto); in otx2_tc_prepare_flow()
679 if (match.mask->ip_proto) in otx2_tc_prepare_flow()
680 ip_proto = match.key->ip_proto; in otx2_tc_prepare_flow()
699 struct flow_match_control match; in otx2_tc_prepare_flow() local
702 flow_rule_match_control(rule, &match); in otx2_tc_prepare_flow()
704 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { in otx2_tc_prepare_flow()
705 val = match.key->flags & FLOW_DIS_IS_FRAGMENT; in otx2_tc_prepare_flow()
722 match.mask->flags, extack)) in otx2_tc_prepare_flow()
727 struct flow_match_eth_addrs match; in otx2_tc_prepare_flow() local
729 flow_rule_match_eth_addrs(rule, &match); in otx2_tc_prepare_flow()
730 if (!is_zero_ether_addr(match.mask->src)) { in otx2_tc_prepare_flow()
731 NL_SET_ERR_MSG_MOD(extack, "src mac match not supported"); in otx2_tc_prepare_flow()
735 if (!is_zero_ether_addr(match.mask->dst)) { in otx2_tc_prepare_flow()
736 ether_addr_copy(flow_spec->dmac, (u8 *)&match.key->dst); in otx2_tc_prepare_flow()
738 (u8 *)&match.mask->dst); in otx2_tc_prepare_flow()
744 struct flow_match_ipsec match; in otx2_tc_prepare_flow() local
746 flow_rule_match_ipsec(rule, &match); in otx2_tc_prepare_flow()
747 if (!match.mask->spi) { in otx2_tc_prepare_flow()
758 flow_spec->spi = match.key->spi; in otx2_tc_prepare_flow()
759 flow_mask->spi = match.mask->spi; in otx2_tc_prepare_flow()
764 struct flow_match_ip match; in otx2_tc_prepare_flow() local
766 flow_rule_match_ip(rule, &match); in otx2_tc_prepare_flow()
768 match.mask->tos) { in otx2_tc_prepare_flow()
772 if (match.mask->ttl) { in otx2_tc_prepare_flow()
776 flow_spec->tos = match.key->tos; in otx2_tc_prepare_flow()
777 flow_mask->tos = match.mask->tos; in otx2_tc_prepare_flow()
798 struct flow_match_ipv4_addrs match; in otx2_tc_prepare_flow() local
800 flow_rule_match_ipv4_addrs(rule, &match); in otx2_tc_prepare_flow()
802 flow_spec->ip4dst = match.key->dst; in otx2_tc_prepare_flow()
803 flow_mask->ip4dst = match.mask->dst; in otx2_tc_prepare_flow()
806 flow_spec->ip4src = match.key->src; in otx2_tc_prepare_flow()
807 flow_mask->ip4src = match.mask->src; in otx2_tc_prepare_flow()
810 struct flow_match_ipv6_addrs match; in otx2_tc_prepare_flow() local
812 flow_rule_match_ipv6_addrs(rule, &match); in otx2_tc_prepare_flow()
814 if (ipv6_addr_loopback(&match.key->dst) || in otx2_tc_prepare_flow()
815 ipv6_addr_loopback(&match.key->src)) { in otx2_tc_prepare_flow()
821 if (!ipv6_addr_any(&match.mask->dst)) { in otx2_tc_prepare_flow()
823 (struct in6_addr *)&match.key->dst, in otx2_tc_prepare_flow()
826 (struct in6_addr *)&match.mask->dst, in otx2_tc_prepare_flow()
831 if (!ipv6_addr_any(&match.mask->src)) { in otx2_tc_prepare_flow()
833 (struct in6_addr *)&match.key->src, in otx2_tc_prepare_flow()
836 (struct in6_addr *)&match.mask->src, in otx2_tc_prepare_flow()
843 struct flow_match_ports match; in otx2_tc_prepare_flow() local
845 flow_rule_match_ports(rule, &match); in otx2_tc_prepare_flow()
847 flow_spec->dport = match.key->dst; in otx2_tc_prepare_flow()
848 flow_mask->dport = match.mask->dst; in otx2_tc_prepare_flow()
859 flow_spec->sport = match.key->src; in otx2_tc_prepare_flow()
860 flow_mask->sport = match.mask->src; in otx2_tc_prepare_flow()
873 struct flow_match_tcp match; in otx2_tc_prepare_flow() local
875 flow_rule_match_tcp(rule, &match); in otx2_tc_prepare_flow()
877 flow_spec->tcp_flags = match.key->flags; in otx2_tc_prepare_flow()
878 flow_mask->tcp_flags = match.mask->flags; in otx2_tc_prepare_flow()
883 struct flow_match_mpls match; in otx2_tc_prepare_flow() local
886 flow_rule_match_mpls(rule, &match); in otx2_tc_prepare_flow()
888 if (match.mask->used_lses & OTX2_UNSUPP_LSE_DEPTH) { in otx2_tc_prepare_flow()
890 "unsupported LSE depth for MPLS match offload"); in otx2_tc_prepare_flow()
894 for_each_set_bit(bit, (unsigned long *)&match.mask->used_lses, in otx2_tc_prepare_flow()
897 if (*((u32 *)&match.mask->ls[bit]) & in otx2_tc_prepare_flow()
909 match.key->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
911 match.key->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
913 match.key->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
917 match.mask->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
919 match.mask->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
921 match.mask->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
924 if (match.mask->ls[bit].mpls_ttl) { in otx2_tc_prepare_flow()
929 match.key->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
932 match.mask->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
938 struct flow_match_icmp match; in otx2_tc_prepare_flow() local
940 flow_rule_match_icmp(rule, &match); in otx2_tc_prepare_flow()
942 flow_spec->icmp_type = match.key->type; in otx2_tc_prepare_flow()
943 flow_mask->icmp_type = match.mask->type; in otx2_tc_prepare_flow()
946 flow_spec->icmp_code = match.key->code; in otx2_tc_prepare_flow()
947 flow_mask->icmp_code = match.mask->code; in otx2_tc_prepare_flow()