Lines Matching refs:match
1017 ice_tc_set_pppoe(struct flow_match_pppoe *match, in ice_tc_set_pppoe() argument
1021 if (match->mask->session_id) { in ice_tc_set_pppoe()
1023 headers->pppoe_hdr.session_id = match->key->session_id; in ice_tc_set_pppoe()
1026 if (match->mask->ppp_proto) { in ice_tc_set_pppoe()
1028 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto; in ice_tc_set_pppoe()
1031 return be16_to_cpu(match->key->type); in ice_tc_set_pppoe()
1042 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
1046 if (match->key->dst) { in ice_tc_set_ipv4()
1051 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
1052 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
1054 if (match->key->src) { in ice_tc_set_ipv4()
1059 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
1060 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
1073 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
1082 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
1083 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
1088 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
1089 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1093 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
1099 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1111 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
1112 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
1113 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
1114 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
1118 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
1119 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
1120 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
1121 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
1135 ice_tc_set_tos_ttl(struct flow_match_ip *match, in ice_tc_set_tos_ttl() argument
1140 if (match->mask->tos) { in ice_tc_set_tos_ttl()
1146 headers->l3_key.tos = match->key->tos; in ice_tc_set_tos_ttl()
1147 headers->l3_mask.tos = match->mask->tos; in ice_tc_set_tos_ttl()
1150 if (match->mask->ttl) { in ice_tc_set_tos_ttl()
1156 headers->l3_key.ttl = match->key->ttl; in ice_tc_set_tos_ttl()
1157 headers->l3_mask.ttl = match->mask->ttl; in ice_tc_set_tos_ttl()
1169 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
1173 if (match.key->dst) { in ice_tc_set_port()
1179 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
1180 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
1182 if (match.key->src) { in ice_tc_set_port()
1188 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
1189 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
1223 ice_parse_gtp_type(struct flow_match_ports match, in ice_parse_gtp_type() argument
1228 if (match.key->dst) { in ice_parse_gtp_type()
1229 dst_port = be16_to_cpu(match.key->dst); in ice_parse_gtp_type()
1272 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
1274 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
1275 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1279 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
1281 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
1282 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1287 struct flow_match_ip match; in ice_parse_tunnel_attr() local
1289 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
1290 ice_tc_set_tos_ttl(&match, fltr, headers, true); in ice_parse_tunnel_attr()
1295 struct flow_match_ports match; in ice_parse_tunnel_attr() local
1297 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
1300 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
1303 if (ice_parse_gtp_type(match, fltr)) in ice_parse_tunnel_attr()
1309 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1311 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1313 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0], in ice_parse_tunnel_attr()
1316 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0], in ice_parse_tunnel_attr()
1343 dissector = rule->match.dissector; in ice_parse_cls_flower()
1396 struct flow_match_basic match; in ice_parse_cls_flower() local
1398 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
1400 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1401 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1414 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
1418 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
1420 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
1422 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
1424 match.key->dst); in ice_parse_cls_flower()
1426 match.mask->dst); in ice_parse_cls_flower()
1430 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
1432 match.key->src); in ice_parse_cls_flower()
1434 match.mask->src); in ice_parse_cls_flower()
1443 struct flow_match_vlan match; in ice_parse_cls_flower() local
1446 match.key = &key; in ice_parse_cls_flower()
1447 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
1448 match.key->vlan_priority = 0; in ice_parse_cls_flower()
1449 match.mask = &mask; in ice_parse_cls_flower()
1450 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
1451 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
1453 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
1456 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1457 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1460 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1468 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1471 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1475 if (match.mask->vlan_tpid) { in ice_parse_cls_flower()
1476 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid; in ice_parse_cls_flower()
1482 struct flow_match_vlan match; in ice_parse_cls_flower() local
1489 flow_rule_match_cvlan(rule, &match); in ice_parse_cls_flower()
1491 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1492 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1495 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1504 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1507 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1513 struct flow_match_pppoe match; in ice_parse_cls_flower() local
1515 flow_rule_match_pppoe(rule, &match); in ice_parse_cls_flower()
1516 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers); in ice_parse_cls_flower()
1529 struct flow_match_control match; in ice_parse_cls_flower() local
1531 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
1533 addr_type = match.key->addr_type; in ice_parse_cls_flower()
1537 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
1539 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
1540 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
1545 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
1547 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
1548 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
1553 struct flow_match_ip match; in ice_parse_cls_flower() local
1555 flow_rule_match_ip(rule, &match); in ice_parse_cls_flower()
1556 ice_tc_set_tos_ttl(&match, fltr, headers, false); in ice_parse_cls_flower()
1560 struct flow_match_l2tpv3 match; in ice_parse_cls_flower() local
1562 flow_rule_match_l2tpv3(rule, &match); in ice_parse_cls_flower()
1565 headers->l2tpv3_hdr.session_id = match.key->session_id; in ice_parse_cls_flower()
1569 struct flow_match_ports match; in ice_parse_cls_flower() local
1571 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
1572 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()