Lines Matching full:match

576 	struct flow_match_vlan match;  in otx2_tc_process_vlan()  local
580 flow_rule_match_cvlan(rule, &match); in otx2_tc_process_vlan()
582 flow_rule_match_vlan(rule, &match); in otx2_tc_process_vlan()
584 if (!eth_type_vlan(match.key->vlan_tpid)) { in otx2_tc_process_vlan()
586 ntohs(match.key->vlan_tpid)); in otx2_tc_process_vlan()
590 if (!match.mask->vlan_id) { in otx2_tc_process_vlan()
598 ntohs(match.key->vlan_tpid), match.key->vlan_id); in otx2_tc_process_vlan()
604 if (match.mask->vlan_id || in otx2_tc_process_vlan()
605 match.mask->vlan_dei || in otx2_tc_process_vlan()
606 match.mask->vlan_priority) { in otx2_tc_process_vlan()
607 vlan_tci = match.key->vlan_id | in otx2_tc_process_vlan()
608 match.key->vlan_dei << 12 | in otx2_tc_process_vlan()
609 match.key->vlan_priority << 13; in otx2_tc_process_vlan()
611 vlan_tci_mask = match.mask->vlan_id | in otx2_tc_process_vlan()
612 match.mask->vlan_dei << 12 | in otx2_tc_process_vlan()
613 match.mask->vlan_priority << 13; in otx2_tc_process_vlan()
640 dissector = rule->match.dissector; in otx2_tc_prepare_flow()
662 struct flow_match_basic match; in otx2_tc_prepare_flow() local
664 flow_rule_match_basic(rule, &match); in otx2_tc_prepare_flow()
667 flow_spec->etype = match.key->n_proto; in otx2_tc_prepare_flow()
668 flow_mask->etype = match.mask->n_proto; in otx2_tc_prepare_flow()
671 if (match.mask->ip_proto && in otx2_tc_prepare_flow()
672 (match.key->ip_proto != IPPROTO_TCP && in otx2_tc_prepare_flow()
673 match.key->ip_proto != IPPROTO_UDP && in otx2_tc_prepare_flow()
674 match.key->ip_proto != IPPROTO_SCTP && in otx2_tc_prepare_flow()
675 match.key->ip_proto != IPPROTO_ICMP && in otx2_tc_prepare_flow()
676 match.key->ip_proto != IPPROTO_ESP && in otx2_tc_prepare_flow()
677 match.key->ip_proto != IPPROTO_AH && in otx2_tc_prepare_flow()
678 match.key->ip_proto != IPPROTO_ICMPV6)) { in otx2_tc_prepare_flow()
681 match.key->ip_proto); in otx2_tc_prepare_flow()
684 if (match.mask->ip_proto) in otx2_tc_prepare_flow()
685 ip_proto = match.key->ip_proto; in otx2_tc_prepare_flow()
704 struct flow_match_control match; in otx2_tc_prepare_flow() local
707 flow_rule_match_control(rule, &match); in otx2_tc_prepare_flow()
709 if (match.mask->flags & FLOW_DIS_IS_FRAGMENT) { in otx2_tc_prepare_flow()
710 val = match.key->flags & FLOW_DIS_IS_FRAGMENT; in otx2_tc_prepare_flow()
727 match.mask->flags, extack)) in otx2_tc_prepare_flow()
732 struct flow_match_eth_addrs match; in otx2_tc_prepare_flow() local
734 flow_rule_match_eth_addrs(rule, &match); in otx2_tc_prepare_flow()
735 if (!is_zero_ether_addr(match.mask->src)) { in otx2_tc_prepare_flow()
736 NL_SET_ERR_MSG_MOD(extack, "src mac match not supported"); in otx2_tc_prepare_flow()
740 if (!is_zero_ether_addr(match.mask->dst)) { in otx2_tc_prepare_flow()
741 ether_addr_copy(flow_spec->dmac, (u8 *)&match.key->dst); in otx2_tc_prepare_flow()
743 (u8 *)&match.mask->dst); in otx2_tc_prepare_flow()
749 struct flow_match_ipsec match; in otx2_tc_prepare_flow() local
751 flow_rule_match_ipsec(rule, &match); in otx2_tc_prepare_flow()
752 if (!match.mask->spi) { in otx2_tc_prepare_flow()
763 flow_spec->spi = match.key->spi; in otx2_tc_prepare_flow()
764 flow_mask->spi = match.mask->spi; in otx2_tc_prepare_flow()
769 struct flow_match_ip match; in otx2_tc_prepare_flow() local
771 flow_rule_match_ip(rule, &match); in otx2_tc_prepare_flow()
773 match.mask->tos) { in otx2_tc_prepare_flow()
777 if (match.mask->ttl) { in otx2_tc_prepare_flow()
781 flow_spec->tos = match.key->tos; in otx2_tc_prepare_flow()
782 flow_mask->tos = match.mask->tos; in otx2_tc_prepare_flow()
803 struct flow_match_ipv4_addrs match; in otx2_tc_prepare_flow() local
805 flow_rule_match_ipv4_addrs(rule, &match); in otx2_tc_prepare_flow()
807 flow_spec->ip4dst = match.key->dst; in otx2_tc_prepare_flow()
808 flow_mask->ip4dst = match.mask->dst; in otx2_tc_prepare_flow()
811 flow_spec->ip4src = match.key->src; in otx2_tc_prepare_flow()
812 flow_mask->ip4src = match.mask->src; in otx2_tc_prepare_flow()
815 struct flow_match_ipv6_addrs match; in otx2_tc_prepare_flow() local
817 flow_rule_match_ipv6_addrs(rule, &match); in otx2_tc_prepare_flow()
819 if (ipv6_addr_loopback(&match.key->dst) || in otx2_tc_prepare_flow()
820 ipv6_addr_loopback(&match.key->src)) { in otx2_tc_prepare_flow()
826 if (!ipv6_addr_any(&match.mask->dst)) { in otx2_tc_prepare_flow()
828 (struct in6_addr *)&match.key->dst, in otx2_tc_prepare_flow()
831 (struct in6_addr *)&match.mask->dst, in otx2_tc_prepare_flow()
836 if (!ipv6_addr_any(&match.mask->src)) { in otx2_tc_prepare_flow()
838 (struct in6_addr *)&match.key->src, in otx2_tc_prepare_flow()
841 (struct in6_addr *)&match.mask->src, in otx2_tc_prepare_flow()
848 struct flow_match_ports match; in otx2_tc_prepare_flow() local
850 flow_rule_match_ports(rule, &match); in otx2_tc_prepare_flow()
852 flow_spec->dport = match.key->dst; in otx2_tc_prepare_flow()
853 flow_mask->dport = match.mask->dst; in otx2_tc_prepare_flow()
864 flow_spec->sport = match.key->src; in otx2_tc_prepare_flow()
865 flow_mask->sport = match.mask->src; in otx2_tc_prepare_flow()
878 struct flow_match_tcp match; in otx2_tc_prepare_flow() local
880 flow_rule_match_tcp(rule, &match); in otx2_tc_prepare_flow()
882 flow_spec->tcp_flags = match.key->flags; in otx2_tc_prepare_flow()
883 flow_mask->tcp_flags = match.mask->flags; in otx2_tc_prepare_flow()
888 struct flow_match_mpls match; in otx2_tc_prepare_flow() local
891 flow_rule_match_mpls(rule, &match); in otx2_tc_prepare_flow()
893 if (match.mask->used_lses & OTX2_UNSUPP_LSE_DEPTH) { in otx2_tc_prepare_flow()
895 "unsupported LSE depth for MPLS match offload"); in otx2_tc_prepare_flow()
899 for_each_set_bit(bit, (unsigned long *)&match.mask->used_lses, in otx2_tc_prepare_flow()
902 if (*((u32 *)&match.mask->ls[bit]) & in otx2_tc_prepare_flow()
914 match.key->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
916 match.key->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
918 match.key->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
922 match.mask->ls[bit].mpls_label) | in otx2_tc_prepare_flow()
924 match.mask->ls[bit].mpls_tc) | in otx2_tc_prepare_flow()
926 match.mask->ls[bit].mpls_bos); in otx2_tc_prepare_flow()
929 if (match.mask->ls[bit].mpls_ttl) { in otx2_tc_prepare_flow()
934 match.key->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
937 match.mask->ls[bit].mpls_ttl); in otx2_tc_prepare_flow()
943 struct flow_match_icmp match; in otx2_tc_prepare_flow() local
945 flow_rule_match_icmp(rule, &match); in otx2_tc_prepare_flow()
947 flow_spec->icmp_type = match.key->type; in otx2_tc_prepare_flow()
948 flow_mask->icmp_type = match.mask->type; in otx2_tc_prepare_flow()
951 flow_spec->icmp_code = match.key->code; in otx2_tc_prepare_flow()
952 flow_mask->icmp_code = match.mask->code; in otx2_tc_prepare_flow()