Lines Matching refs:match
612 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
616 if (match->key->dst) { in ice_tc_set_ipv4()
621 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
622 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
624 if (match->key->src) { in ice_tc_set_ipv4()
629 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
630 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
643 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
652 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
653 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
658 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
659 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
663 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
669 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
681 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
682 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
683 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
684 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
688 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
689 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
690 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
691 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
705 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
709 if (match.key->dst) { in ice_tc_set_port()
715 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
716 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
718 if (match.key->src) { in ice_tc_set_port()
724 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
725 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
774 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
776 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
777 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
781 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
783 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
784 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
789 struct flow_match_ip match; in ice_parse_tunnel_attr() local
791 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
792 headers->l3_key.tos = match.key->tos; in ice_parse_tunnel_attr()
793 headers->l3_key.ttl = match.key->ttl; in ice_parse_tunnel_attr()
794 headers->l3_mask.tos = match.mask->tos; in ice_parse_tunnel_attr()
795 headers->l3_mask.ttl = match.mask->ttl; in ice_parse_tunnel_attr()
800 struct flow_match_ports match; in ice_parse_tunnel_attr() local
802 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
803 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
828 dissector = rule->match.dissector; in ice_parse_cls_flower()
876 struct flow_match_basic match; in ice_parse_cls_flower() local
878 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
880 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
881 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
892 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
896 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
898 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
900 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
902 match.key->dst); in ice_parse_cls_flower()
904 match.mask->dst); in ice_parse_cls_flower()
908 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
910 match.key->src); in ice_parse_cls_flower()
912 match.mask->src); in ice_parse_cls_flower()
921 struct flow_match_vlan match; in ice_parse_cls_flower() local
924 match.key = &key; in ice_parse_cls_flower()
925 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
926 match.key->vlan_priority = 0; in ice_parse_cls_flower()
927 match.mask = &mask; in ice_parse_cls_flower()
928 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
929 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
931 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
934 if (match.mask->vlan_id) { in ice_parse_cls_flower()
935 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
944 cpu_to_be16(match.key->vlan_id & VLAN_VID_MASK); in ice_parse_cls_flower()
945 if (match.mask->vlan_priority) in ice_parse_cls_flower()
946 headers->vlan_hdr.vlan_prio = match.key->vlan_priority; in ice_parse_cls_flower()
950 struct flow_match_control match; in ice_parse_cls_flower() local
952 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
954 addr_type = match.key->addr_type; in ice_parse_cls_flower()
958 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
960 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
961 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
966 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
968 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
969 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
974 struct flow_match_ports match; in ice_parse_cls_flower() local
976 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
977 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()