Lines Matching refs:match

1133 ice_tc_set_pppoe(struct flow_match_pppoe *match,  in ice_tc_set_pppoe()  argument
1137 if (match->mask->session_id) { in ice_tc_set_pppoe()
1139 headers->pppoe_hdr.session_id = match->key->session_id; in ice_tc_set_pppoe()
1142 if (match->mask->ppp_proto) { in ice_tc_set_pppoe()
1144 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto; in ice_tc_set_pppoe()
1147 return be16_to_cpu(match->key->type); in ice_tc_set_pppoe()
1158 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match, in ice_tc_set_ipv4() argument
1162 if (match->key->dst) { in ice_tc_set_ipv4()
1167 headers->l3_key.dst_ipv4 = match->key->dst; in ice_tc_set_ipv4()
1168 headers->l3_mask.dst_ipv4 = match->mask->dst; in ice_tc_set_ipv4()
1170 if (match->key->src) { in ice_tc_set_ipv4()
1175 headers->l3_key.src_ipv4 = match->key->src; in ice_tc_set_ipv4()
1176 headers->l3_mask.src_ipv4 = match->mask->src; in ice_tc_set_ipv4()
1189 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match, in ice_tc_set_ipv6() argument
1198 if (ipv6_addr_loopback(&match->key->dst) || in ice_tc_set_ipv6()
1199 ipv6_addr_loopback(&match->key->src)) { in ice_tc_set_ipv6()
1204 if (ipv6_addr_any(&match->mask->dst) && in ice_tc_set_ipv6()
1205 ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1209 if (!ipv6_addr_any(&match->mask->dst)) { in ice_tc_set_ipv6()
1215 if (!ipv6_addr_any(&match->mask->src)) { in ice_tc_set_ipv6()
1227 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr, in ice_tc_set_ipv6()
1228 sizeof(match->key->src.s6_addr)); in ice_tc_set_ipv6()
1229 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr, in ice_tc_set_ipv6()
1230 sizeof(match->mask->src.s6_addr)); in ice_tc_set_ipv6()
1234 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr, in ice_tc_set_ipv6()
1235 sizeof(match->key->dst.s6_addr)); in ice_tc_set_ipv6()
1236 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr, in ice_tc_set_ipv6()
1237 sizeof(match->mask->dst.s6_addr)); in ice_tc_set_ipv6()
1251 ice_tc_set_tos_ttl(struct flow_match_ip *match, in ice_tc_set_tos_ttl() argument
1256 if (match->mask->tos) { in ice_tc_set_tos_ttl()
1262 headers->l3_key.tos = match->key->tos; in ice_tc_set_tos_ttl()
1263 headers->l3_mask.tos = match->mask->tos; in ice_tc_set_tos_ttl()
1266 if (match->mask->ttl) { in ice_tc_set_tos_ttl()
1272 headers->l3_key.ttl = match->key->ttl; in ice_tc_set_tos_ttl()
1273 headers->l3_mask.ttl = match->mask->ttl; in ice_tc_set_tos_ttl()
1285 ice_tc_set_port(struct flow_match_ports match, in ice_tc_set_port() argument
1289 if (match.key->dst) { in ice_tc_set_port()
1295 headers->l4_key.dst_port = match.key->dst; in ice_tc_set_port()
1296 headers->l4_mask.dst_port = match.mask->dst; in ice_tc_set_port()
1298 if (match.key->src) { in ice_tc_set_port()
1304 headers->l4_key.src_port = match.key->src; in ice_tc_set_port()
1305 headers->l4_mask.src_port = match.mask->src; in ice_tc_set_port()
1339 ice_parse_gtp_type(struct flow_match_ports match, in ice_parse_gtp_type() argument
1344 if (match.key->dst) { in ice_parse_gtp_type()
1345 dst_port = be16_to_cpu(match.key->dst); in ice_parse_gtp_type()
1392 struct flow_match_ipv4_addrs match; in ice_parse_tunnel_attr() local
1394 flow_rule_match_enc_ipv4_addrs(rule, &match); in ice_parse_tunnel_attr()
1395 if (ice_tc_set_ipv4(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1399 struct flow_match_ipv6_addrs match; in ice_parse_tunnel_attr() local
1401 flow_rule_match_enc_ipv6_addrs(rule, &match); in ice_parse_tunnel_attr()
1402 if (ice_tc_set_ipv6(&match, fltr, headers, true)) in ice_parse_tunnel_attr()
1407 struct flow_match_ip match; in ice_parse_tunnel_attr() local
1409 flow_rule_match_enc_ip(rule, &match); in ice_parse_tunnel_attr()
1410 ice_tc_set_tos_ttl(&match, fltr, headers, true); in ice_parse_tunnel_attr()
1415 struct flow_match_ports match; in ice_parse_tunnel_attr() local
1417 flow_rule_match_enc_ports(rule, &match); in ice_parse_tunnel_attr()
1420 if (ice_tc_set_port(match, fltr, headers, true)) in ice_parse_tunnel_attr()
1423 if (ice_parse_gtp_type(match, fltr)) in ice_parse_tunnel_attr()
1430 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1432 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1434 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0], in ice_parse_tunnel_attr()
1437 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0], in ice_parse_tunnel_attr()
1445 struct flow_match_enc_opts match; in ice_parse_tunnel_attr() local
1447 flow_rule_match_enc_opts(rule, &match); in ice_parse_tunnel_attr()
1449 memcpy(&fltr->pfcp_meta_keys, match.key->data, in ice_parse_tunnel_attr()
1451 memcpy(&fltr->pfcp_meta_masks, match.mask->data, in ice_parse_tunnel_attr()
1478 dissector = rule->match.dissector; in ice_parse_cls_flower()
1538 struct flow_match_basic match; in ice_parse_cls_flower() local
1540 flow_rule_match_basic(rule, &match); in ice_parse_cls_flower()
1542 n_proto_key = ntohs(match.key->n_proto); in ice_parse_cls_flower()
1543 n_proto_mask = ntohs(match.mask->n_proto); in ice_parse_cls_flower()
1556 headers->l3_key.ip_proto = match.key->ip_proto; in ice_parse_cls_flower()
1560 struct flow_match_eth_addrs match; in ice_parse_cls_flower() local
1562 flow_rule_match_eth_addrs(rule, &match); in ice_parse_cls_flower()
1564 if (!is_zero_ether_addr(match.key->dst)) { in ice_parse_cls_flower()
1566 match.key->dst); in ice_parse_cls_flower()
1568 match.mask->dst); in ice_parse_cls_flower()
1572 if (!is_zero_ether_addr(match.key->src)) { in ice_parse_cls_flower()
1574 match.key->src); in ice_parse_cls_flower()
1576 match.mask->src); in ice_parse_cls_flower()
1585 struct flow_match_vlan match; in ice_parse_cls_flower() local
1588 match.key = &key; in ice_parse_cls_flower()
1589 match.key->vlan_id = vlan_dev_vlan_id(filter_dev); in ice_parse_cls_flower()
1590 match.key->vlan_priority = 0; in ice_parse_cls_flower()
1591 match.mask = &mask; in ice_parse_cls_flower()
1592 memset(match.mask, 0xff, sizeof(*match.mask)); in ice_parse_cls_flower()
1593 match.mask->vlan_priority = 0; in ice_parse_cls_flower()
1595 flow_rule_match_vlan(rule, &match); in ice_parse_cls_flower()
1598 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1599 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1602 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1610 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1613 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1617 if (match.mask->vlan_tpid) { in ice_parse_cls_flower()
1618 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid; in ice_parse_cls_flower()
1624 struct flow_match_vlan match; in ice_parse_cls_flower() local
1631 flow_rule_match_cvlan(rule, &match); in ice_parse_cls_flower()
1633 if (match.mask->vlan_id) { in ice_parse_cls_flower()
1634 if (match.mask->vlan_id == VLAN_VID_MASK) { in ice_parse_cls_flower()
1637 cpu_to_be16(match.key->vlan_id & in ice_parse_cls_flower()
1646 if (match.mask->vlan_priority) { in ice_parse_cls_flower()
1649 be16_encode_bits(match.key->vlan_priority, in ice_parse_cls_flower()
1655 struct flow_match_pppoe match; in ice_parse_cls_flower() local
1657 flow_rule_match_pppoe(rule, &match); in ice_parse_cls_flower()
1658 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers); in ice_parse_cls_flower()
1671 struct flow_match_control match; in ice_parse_cls_flower() local
1673 flow_rule_match_control(rule, &match); in ice_parse_cls_flower()
1675 addr_type = match.key->addr_type; in ice_parse_cls_flower()
1677 if (flow_rule_has_control_flags(match.mask->flags, in ice_parse_cls_flower()
1683 struct flow_match_ipv4_addrs match; in ice_parse_cls_flower() local
1685 flow_rule_match_ipv4_addrs(rule, &match); in ice_parse_cls_flower()
1686 if (ice_tc_set_ipv4(&match, fltr, headers, false)) in ice_parse_cls_flower()
1691 struct flow_match_ipv6_addrs match; in ice_parse_cls_flower() local
1693 flow_rule_match_ipv6_addrs(rule, &match); in ice_parse_cls_flower()
1694 if (ice_tc_set_ipv6(&match, fltr, headers, false)) in ice_parse_cls_flower()
1699 struct flow_match_ip match; in ice_parse_cls_flower() local
1701 flow_rule_match_ip(rule, &match); in ice_parse_cls_flower()
1702 ice_tc_set_tos_ttl(&match, fltr, headers, false); in ice_parse_cls_flower()
1706 struct flow_match_l2tpv3 match; in ice_parse_cls_flower() local
1708 flow_rule_match_l2tpv3(rule, &match); in ice_parse_cls_flower()
1711 headers->l2tpv3_hdr.session_id = match.key->session_id; in ice_parse_cls_flower()
1715 struct flow_match_ports match; in ice_parse_cls_flower() local
1717 flow_rule_match_ports(rule, &match); in ice_parse_cls_flower()
1718 if (ice_tc_set_port(match, fltr, headers, false)) in ice_parse_cls_flower()