Lines Matching full:match
1107 * @match: Pointer to flow match structure
1113 ice_tc_set_pppoe(struct flow_match_pppoe *match, in ice_tc_set_pppoe() argument
1117 if (match->mask->session_id) { in ice_tc_set_pppoe()
1119 headers->pppoe_hdr.session_id = match->key->session_id; in ice_tc_set_pppoe()
1122 if (match->mask->ppp_proto) { in ice_tc_set_pppoe()
1124 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto; in ice_tc_set_pppoe()
1127 return be16_to_cpu(match->key->type); in ice_tc_set_pppoe()
1132 * @match: Pointer to flow match structure
1138 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
1142 if (match->key->dst) { in ice_tc_set_ipv4()
1147 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
1148 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
1150 if (match->key->src) { in ice_tc_set_ipv4()
1155 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
1156 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
1163 * @match: Pointer to flow match structure
1169 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
1178 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
1179 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
1184 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
1185 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1189 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
1195 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1207 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
1208 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
1209 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
1210 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
1214 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
1215 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
1216 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
1217 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
1225 * @match: Pointer to flow match structure
1231 ice_tc_set_tos_ttl(struct flow_match_ip *match, in ice_tc_set_tos_ttl() argument
1236 if (match->mask->tos) { in ice_tc_set_tos_ttl()
1242 headers->l3_key.tos = match->key->tos; in ice_tc_set_tos_ttl()
1243 headers->l3_mask.tos = match->mask->tos; in ice_tc_set_tos_ttl()
1246 if (match->mask->ttl) { in ice_tc_set_tos_ttl()
1252 headers->l3_key.ttl = match->key->ttl; in ice_tc_set_tos_ttl()
1253 headers->l3_mask.ttl = match->mask->ttl; in ice_tc_set_tos_ttl()
1259 * @match: Flow match structure
1265 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
1269 if (match.key->dst) { in ice_tc_set_port()
1275 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
1276 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
1278 if (match.key->src) { in ice_tc_set_port()
1284 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
1285 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
1310 * @match: Flow match structure
1319 ice_parse_gtp_type(struct flow_match_ports match, in ice_parse_gtp_type() argument
1324 if (match.key->dst) { in ice_parse_gtp_type()
1325 dst_port = be16_to_cpu(match.key->dst); in ice_parse_gtp_type()
1368 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
1370 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
1371 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1375 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
1377 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
1378 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1383 struct flow_match_ip match; in ice_parse_tunnel_attr() local
1385 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
1386 ice_tc_set_tos_ttl(&match, fltr, headers, true); in ice_parse_tunnel_attr()
1391 struct flow_match_ports match; in ice_parse_tunnel_attr() local
1393 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
1396 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
1399 if (ice_parse_gtp_type(match, fltr)) in ice_parse_tunnel_attr()
1405 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1407 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1409 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0], in ice_parse_tunnel_attr()
1412 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0], in ice_parse_tunnel_attr()
1439 dissector = rule->match.dissector; in ice_parse_cls_flower()
1492 struct flow_match_basic match; in ice_parse_cls_flower() local
1494 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
1496 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1497 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1510 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
1514 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
1516 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
1518 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
1520 match.key->dst); in ice_parse_cls_flower()
1522 match.mask->dst); in ice_parse_cls_flower()
1526 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
1528 match.key->src); in ice_parse_cls_flower()
1530 match.mask->src); in ice_parse_cls_flower()
1539 struct flow_match_vlan match; in ice_parse_cls_flower() local
1542 match.key = &key; in ice_parse_cls_flower()
1543 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
1544 match.key->vlan_priority = 0; in ice_parse_cls_flower()
1545 match.mask = &mask; in ice_parse_cls_flower()
1546 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
1547 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
1549 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
1552 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1553 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1556 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1564 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1567 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1571 if (match.mask->vlan_tpid) { in ice_parse_cls_flower()
1572 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid; in ice_parse_cls_flower()
1578 struct flow_match_vlan match; in ice_parse_cls_flower() local
1585 flow_rule_match_cvlan(rule, &match); in ice_parse_cls_flower()
1587 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1588 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1591 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1600 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1603 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1609 struct flow_match_pppoe match; in ice_parse_cls_flower() local
1611 flow_rule_match_pppoe(rule, &match); in ice_parse_cls_flower()
1612 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers); in ice_parse_cls_flower()
1625 struct flow_match_control match; in ice_parse_cls_flower() local
1627 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
1629 addr_type = match.key->addr_type; in ice_parse_cls_flower()
1633 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
1635 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
1636 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
1641 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
1643 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
1644 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
1649 struct flow_match_ip match; in ice_parse_cls_flower() local
1651 flow_rule_match_ip(rule, &match); in ice_parse_cls_flower()
1652 ice_tc_set_tos_ttl(&match, fltr, headers, false); in ice_parse_cls_flower()
1656 struct flow_match_l2tpv3 match; in ice_parse_cls_flower() local
1658 flow_rule_match_l2tpv3(rule, &match); in ice_parse_cls_flower()
1661 headers->l2tpv3_hdr.session_id = match.key->session_id; in ice_parse_cls_flower()
1665 struct flow_match_ports match; in ice_parse_cls_flower() local
1667 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
1668 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()