Lines Matching refs:match

1080 ice_tc_set_pppoe(struct flow_match_pppoe *match,  in ice_tc_set_pppoe()  argument
1084 if (match->mask->session_id) { in ice_tc_set_pppoe()
1086 headers->pppoe_hdr.session_id = match->key->session_id; in ice_tc_set_pppoe()
1089 if (match->mask->ppp_proto) { in ice_tc_set_pppoe()
1091 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto; in ice_tc_set_pppoe()
1094 return be16_to_cpu(match->key->type); in ice_tc_set_pppoe()
1105 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
1109 if (match->key->dst) { in ice_tc_set_ipv4()
1114 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
1115 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
1117 if (match->key->src) { in ice_tc_set_ipv4()
1122 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
1123 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
1136 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
1145 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
1146 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
1151 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
1152 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1156 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
1162 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1174 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
1175 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
1176 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
1177 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
1181 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
1182 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
1183 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
1184 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
1198 ice_tc_set_tos_ttl(struct flow_match_ip *match, in ice_tc_set_tos_ttl() argument
1203 if (match->mask->tos) { in ice_tc_set_tos_ttl()
1209 headers->l3_key.tos = match->key->tos; in ice_tc_set_tos_ttl()
1210 headers->l3_mask.tos = match->mask->tos; in ice_tc_set_tos_ttl()
1213 if (match->mask->ttl) { in ice_tc_set_tos_ttl()
1219 headers->l3_key.ttl = match->key->ttl; in ice_tc_set_tos_ttl()
1220 headers->l3_mask.ttl = match->mask->ttl; in ice_tc_set_tos_ttl()
1232 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
1236 if (match.key->dst) { in ice_tc_set_port()
1242 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
1243 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
1245 if (match.key->src) { in ice_tc_set_port()
1251 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
1252 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
1286 ice_parse_gtp_type(struct flow_match_ports match, in ice_parse_gtp_type() argument
1291 if (match.key->dst) { in ice_parse_gtp_type()
1292 dst_port = be16_to_cpu(match.key->dst); in ice_parse_gtp_type()
1335 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
1337 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
1338 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1342 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
1344 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
1345 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1350 struct flow_match_ip match; in ice_parse_tunnel_attr() local
1352 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
1353 ice_tc_set_tos_ttl(&match, fltr, headers, true); in ice_parse_tunnel_attr()
1358 struct flow_match_ports match; in ice_parse_tunnel_attr() local
1360 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
1363 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
1366 if (ice_parse_gtp_type(match, fltr)) in ice_parse_tunnel_attr()
1372 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1374 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1376 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0], in ice_parse_tunnel_attr()
1379 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0], in ice_parse_tunnel_attr()
1406 dissector = rule->match.dissector; in ice_parse_cls_flower()
1462 struct flow_match_basic match; in ice_parse_cls_flower() local
1464 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
1466 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1467 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1480 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
1484 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
1486 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
1488 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
1490 match.key->dst); in ice_parse_cls_flower()
1492 match.mask->dst); in ice_parse_cls_flower()
1496 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
1498 match.key->src); in ice_parse_cls_flower()
1500 match.mask->src); in ice_parse_cls_flower()
1509 struct flow_match_vlan match; in ice_parse_cls_flower() local
1512 match.key = &key; in ice_parse_cls_flower()
1513 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
1514 match.key->vlan_priority = 0; in ice_parse_cls_flower()
1515 match.mask = &mask; in ice_parse_cls_flower()
1516 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
1517 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
1519 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
1522 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1523 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1526 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1534 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1537 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1541 if (match.mask->vlan_tpid) { in ice_parse_cls_flower()
1542 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid; in ice_parse_cls_flower()
1548 struct flow_match_vlan match; in ice_parse_cls_flower() local
1555 flow_rule_match_cvlan(rule, &match); in ice_parse_cls_flower()
1557 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1558 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1561 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1570 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1573 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1579 struct flow_match_pppoe match; in ice_parse_cls_flower() local
1581 flow_rule_match_pppoe(rule, &match); in ice_parse_cls_flower()
1582 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers); in ice_parse_cls_flower()
1595 struct flow_match_control match; in ice_parse_cls_flower() local
1597 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
1599 addr_type = match.key->addr_type; in ice_parse_cls_flower()
1603 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
1605 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
1606 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
1611 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
1613 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
1614 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
1619 struct flow_match_ip match; in ice_parse_cls_flower() local
1621 flow_rule_match_ip(rule, &match); in ice_parse_cls_flower()
1622 ice_tc_set_tos_ttl(&match, fltr, headers, false); in ice_parse_cls_flower()
1626 struct flow_match_l2tpv3 match; in ice_parse_cls_flower() local
1628 flow_rule_match_l2tpv3(rule, &match); in ice_parse_cls_flower()
1631 headers->l2tpv3_hdr.session_id = match.key->session_id; in ice_parse_cls_flower()
1635 struct flow_match_ports match; in ice_parse_cls_flower() local
1637 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
1638 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()