Lines Matching refs:match

871 ice_tc_set_pppoe(struct flow_match_pppoe *match,  in ice_tc_set_pppoe()  argument
875 if (match->mask->session_id) { in ice_tc_set_pppoe()
877 headers->pppoe_hdr.session_id = match->key->session_id; in ice_tc_set_pppoe()
880 if (match->mask->ppp_proto) { in ice_tc_set_pppoe()
882 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto; in ice_tc_set_pppoe()
885 return be16_to_cpu(match->key->type); in ice_tc_set_pppoe()
896 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
900 if (match->key->dst) { in ice_tc_set_ipv4()
905 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
906 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
908 if (match->key->src) { in ice_tc_set_ipv4()
913 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
914 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
927 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
936 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
937 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
942 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
943 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
947 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
953 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
965 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
966 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
967 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
968 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
972 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
973 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
974 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
975 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
989 ice_tc_set_tos_ttl(struct flow_match_ip *match, in ice_tc_set_tos_ttl() argument
994 if (match->mask->tos) { in ice_tc_set_tos_ttl()
1000 headers->l3_key.tos = match->key->tos; in ice_tc_set_tos_ttl()
1001 headers->l3_mask.tos = match->mask->tos; in ice_tc_set_tos_ttl()
1004 if (match->mask->ttl) { in ice_tc_set_tos_ttl()
1010 headers->l3_key.ttl = match->key->ttl; in ice_tc_set_tos_ttl()
1011 headers->l3_mask.ttl = match->mask->ttl; in ice_tc_set_tos_ttl()
1023 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
1027 if (match.key->dst) { in ice_tc_set_port()
1033 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
1034 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
1036 if (match.key->src) { in ice_tc_set_port()
1042 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
1043 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
1077 ice_parse_gtp_type(struct flow_match_ports match, in ice_parse_gtp_type() argument
1082 if (match.key->dst) { in ice_parse_gtp_type()
1083 dst_port = be16_to_cpu(match.key->dst); in ice_parse_gtp_type()
1126 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
1128 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
1129 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1133 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
1135 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
1136 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1141 struct flow_match_ip match; in ice_parse_tunnel_attr() local
1143 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
1144 ice_tc_set_tos_ttl(&match, fltr, headers, true); in ice_parse_tunnel_attr()
1149 struct flow_match_ports match; in ice_parse_tunnel_attr() local
1151 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
1154 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
1157 if (ice_parse_gtp_type(match, fltr)) in ice_parse_tunnel_attr()
1163 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1165 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1167 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0], in ice_parse_tunnel_attr()
1170 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0], in ice_parse_tunnel_attr()
1197 dissector = rule->match.dissector; in ice_parse_cls_flower()
1250 struct flow_match_basic match; in ice_parse_cls_flower() local
1252 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
1254 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1255 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1268 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
1272 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
1274 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
1276 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
1278 match.key->dst); in ice_parse_cls_flower()
1280 match.mask->dst); in ice_parse_cls_flower()
1284 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
1286 match.key->src); in ice_parse_cls_flower()
1288 match.mask->src); in ice_parse_cls_flower()
1297 struct flow_match_vlan match; in ice_parse_cls_flower() local
1300 match.key = &key; in ice_parse_cls_flower()
1301 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
1302 match.key->vlan_priority = 0; in ice_parse_cls_flower()
1303 match.mask = &mask; in ice_parse_cls_flower()
1304 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
1305 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
1307 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
1310 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1311 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1314 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1322 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1325 cpu_to_be16((match.key->vlan_priority << in ice_parse_cls_flower()
1329 if (match.mask->vlan_tpid) in ice_parse_cls_flower()
1330 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid; in ice_parse_cls_flower()
1334 struct flow_match_vlan match; in ice_parse_cls_flower() local
1341 flow_rule_match_cvlan(rule, &match); in ice_parse_cls_flower()
1343 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1344 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1347 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1356 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1359 cpu_to_be16((match.key->vlan_priority << in ice_parse_cls_flower()
1365 struct flow_match_pppoe match; in ice_parse_cls_flower() local
1367 flow_rule_match_pppoe(rule, &match); in ice_parse_cls_flower()
1368 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers); in ice_parse_cls_flower()
1381 struct flow_match_control match; in ice_parse_cls_flower() local
1383 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
1385 addr_type = match.key->addr_type; in ice_parse_cls_flower()
1389 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
1391 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
1392 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
1397 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
1399 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
1400 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
1405 struct flow_match_ip match; in ice_parse_cls_flower() local
1407 flow_rule_match_ip(rule, &match); in ice_parse_cls_flower()
1408 ice_tc_set_tos_ttl(&match, fltr, headers, false); in ice_parse_cls_flower()
1412 struct flow_match_l2tpv3 match; in ice_parse_cls_flower() local
1414 flow_rule_match_l2tpv3(rule, &match); in ice_parse_cls_flower()
1417 headers->l2tpv3_hdr.session_id = match.key->session_id; in ice_parse_cls_flower()
1421 struct flow_match_ports match; in ice_parse_cls_flower() local
1423 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
1424 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()