Lines Matching refs:match
1291 * @match: Pointer to flow match structure
1297 ice_tc_set_pppoe(struct flow_match_pppoe *match,
1301 if (match->mask->session_id) {
1303 headers->pppoe_hdr.session_id = match->key->session_id;
1306 if (match->mask->ppp_proto) {
1308 headers->pppoe_hdr.ppp_proto = match->key->ppp_proto;
1311 return be16_to_cpu(match->key->type);
1316 * @match: Pointer to flow match structure
1322 ice_tc_set_ipv4(struct flow_match_ipv4_addrs *match,
1326 if (match->key->dst) {
1331 headers->l3_key.dst_ipv4 = match->key->dst;
1332 headers->l3_mask.dst_ipv4 = match->mask->dst;
1334 if (match->key->src) {
1339 headers->l3_key.src_ipv4 = match->key->src;
1340 headers->l3_mask.src_ipv4 = match->mask->src;
1347 * @match: Pointer to flow match structure
1353 ice_tc_set_ipv6(struct flow_match_ipv6_addrs *match,
1362 if (ipv6_addr_loopback(&match->key->dst) ||
1363 ipv6_addr_loopback(&match->key->src)) {
1368 if (ipv6_addr_any(&match->mask->dst) &&
1369 ipv6_addr_any(&match->mask->src)) {
1373 if (!ipv6_addr_any(&match->mask->dst)) {
1379 if (!ipv6_addr_any(&match->mask->src)) {
1391 memcpy(&l3_key->src_ipv6_addr, &match->key->src.s6_addr,
1392 sizeof(match->key->src.s6_addr));
1393 memcpy(&l3_mask->src_ipv6_addr, &match->mask->src.s6_addr,
1394 sizeof(match->mask->src.s6_addr));
1398 memcpy(&l3_key->dst_ipv6_addr, &match->key->dst.s6_addr,
1399 sizeof(match->key->dst.s6_addr));
1400 memcpy(&l3_mask->dst_ipv6_addr, &match->mask->dst.s6_addr,
1401 sizeof(match->mask->dst.s6_addr));
1409 * @match: Pointer to flow match structure
1415 ice_tc_set_tos_ttl(struct flow_match_ip *match,
1420 if (match->mask->tos) {
1426 headers->l3_key.tos = match->key->tos;
1427 headers->l3_mask.tos = match->mask->tos;
1430 if (match->mask->ttl) {
1436 headers->l3_key.ttl = match->key->ttl;
1437 headers->l3_mask.ttl = match->mask->ttl;
1443 * @match: Flow match structure
1449 ice_tc_set_port(struct flow_match_ports match,
1453 if (match.key->dst) {
1459 headers->l4_key.dst_port = match.key->dst;
1460 headers->l4_mask.dst_port = match.mask->dst;
1462 if (match.key->src) {
1468 headers->l4_key.src_port = match.key->src;
1469 headers->l4_mask.src_port = match.mask->src;
1494 * @match: Flow match structure
1503 ice_parse_gtp_type(struct flow_match_ports match,
1508 if (match.key->dst) {
1509 dst_port = be16_to_cpu(match.key->dst);
1556 struct flow_match_ipv4_addrs match;
1558 flow_rule_match_enc_ipv4_addrs(rule, &match);
1559 if (ice_tc_set_ipv4(&match, fltr, headers, true))
1563 struct flow_match_ipv6_addrs match;
1565 flow_rule_match_enc_ipv6_addrs(rule, &match);
1566 if (ice_tc_set_ipv6(&match, fltr, headers, true))
1571 struct flow_match_ip match;
1573 flow_rule_match_enc_ip(rule, &match);
1574 ice_tc_set_tos_ttl(&match, fltr, headers, true);
1579 struct flow_match_ports match;
1581 flow_rule_match_enc_ports(rule, &match);
1584 if (ice_tc_set_port(match, fltr, headers, true))
1587 if (ice_parse_gtp_type(match, fltr))
1594 struct flow_match_enc_opts match;
1596 flow_rule_match_enc_opts(rule, &match);
1598 memcpy(&fltr->gtp_pdu_info_keys, &match.key->data[0],
1601 memcpy(&fltr->gtp_pdu_info_masks, &match.mask->data[0],
1609 struct flow_match_enc_opts match;
1611 flow_rule_match_enc_opts(rule, &match);
1613 memcpy(&fltr->pfcp_meta_keys, match.key->data,
1615 memcpy(&fltr->pfcp_meta_masks, match.mask->data,
1647 dissector = rule->match.dissector;
1707 struct flow_match_basic match;
1709 flow_rule_match_basic(rule, &match);
1711 n_proto_key = ntohs(match.key->n_proto);
1712 n_proto_mask = ntohs(match.mask->n_proto);
1739 headers->l3_key.ip_proto = match.key->ip_proto;
1743 struct flow_match_eth_addrs match;
1745 flow_rule_match_eth_addrs(rule, &match);
1747 if (!is_zero_ether_addr(match.key->dst)) {
1749 match.key->dst);
1751 match.mask->dst);
1755 if (!is_zero_ether_addr(match.key->src)) {
1757 match.key->src);
1759 match.mask->src);
1768 struct flow_match_vlan match;
1771 match.key = &key;
1772 match.key->vlan_id = vlan_dev_vlan_id(filter_dev);
1773 match.key->vlan_priority = 0;
1774 match.mask = &mask;
1775 memset(match.mask, 0xff, sizeof(*match.mask));
1776 match.mask->vlan_priority = 0;
1778 flow_rule_match_vlan(rule, &match);
1781 if (match.mask->vlan_id) {
1782 if (match.mask->vlan_id == VLAN_VID_MASK) {
1785 cpu_to_be16(match.key->vlan_id &
1793 if (match.mask->vlan_priority) {
1796 be16_encode_bits(match.key->vlan_priority,
1800 if (match.mask->vlan_tpid) {
1801 headers->vlan_hdr.vlan_tpid = match.key->vlan_tpid;
1807 struct flow_match_vlan match;
1814 flow_rule_match_cvlan(rule, &match);
1816 if (match.mask->vlan_id) {
1817 if (match.mask->vlan_id == VLAN_VID_MASK) {
1820 cpu_to_be16(match.key->vlan_id &
1829 if (match.mask->vlan_priority) {
1832 be16_encode_bits(match.key->vlan_priority,
1838 struct flow_match_pppoe match;
1840 flow_rule_match_pppoe(rule, &match);
1841 n_proto_key = ice_tc_set_pppoe(&match, fltr, headers);
1854 struct flow_match_control match;
1856 flow_rule_match_control(rule, &match);
1858 addr_type = match.key->addr_type;
1860 if (flow_rule_has_control_flags(match.mask->flags,
1866 struct flow_match_ipv4_addrs match;
1868 flow_rule_match_ipv4_addrs(rule, &match);
1869 if (ice_tc_set_ipv4(&match, fltr, headers, false))
1874 struct flow_match_ipv6_addrs match;
1876 flow_rule_match_ipv6_addrs(rule, &match);
1877 if (ice_tc_set_ipv6(&match, fltr, headers, false))
1882 struct flow_match_ip match;
1884 flow_rule_match_ip(rule, &match);
1885 ice_tc_set_tos_ttl(&match, fltr, headers, false);
1889 struct flow_match_l2tpv3 match;
1891 flow_rule_match_l2tpv3(rule, &match);
1894 headers->l2tpv3_hdr.session_id = match.key->session_id;
1898 struct flow_match_ports match;
1900 flow_rule_match_ports(rule, &match);
1901 if (ice_tc_set_port(match, fltr, headers, false))