Lines Matching refs:tuples

435 	  offsetof(struct hclge_fd_rule, tuples.dst_mac),
438 offsetof(struct hclge_fd_rule, tuples.src_mac),
441 offsetof(struct hclge_fd_rule, tuples.vlan_tag1),
445 offsetof(struct hclge_fd_rule, tuples.ether_proto),
448 offsetof(struct hclge_fd_rule, tuples.l2_user_def),
451 offsetof(struct hclge_fd_rule, tuples.ip_tos),
454 offsetof(struct hclge_fd_rule, tuples.ip_proto),
457 offsetof(struct hclge_fd_rule, tuples.src_ip),
460 offsetof(struct hclge_fd_rule, tuples.dst_ip),
463 offsetof(struct hclge_fd_rule, tuples.l3_user_def),
466 offsetof(struct hclge_fd_rule, tuples.src_port),
469 offsetof(struct hclge_fd_rule, tuples.dst_port),
472 offsetof(struct hclge_fd_rule, tuples.l4_user_def),
6250 rule->tuples.src_ip[IPV4_INDEX] = in hclge_fd_get_tcpip4_tuple()
6255 rule->tuples.dst_ip[IPV4_INDEX] = in hclge_fd_get_tcpip4_tuple()
6260 rule->tuples.src_port = be16_to_cpu(fs->h_u.tcp_ip4_spec.psrc); in hclge_fd_get_tcpip4_tuple()
6263 rule->tuples.dst_port = be16_to_cpu(fs->h_u.tcp_ip4_spec.pdst); in hclge_fd_get_tcpip4_tuple()
6266 rule->tuples.ip_tos = fs->h_u.tcp_ip4_spec.tos; in hclge_fd_get_tcpip4_tuple()
6269 rule->tuples.ether_proto = ETH_P_IP; in hclge_fd_get_tcpip4_tuple()
6272 rule->tuples.ip_proto = ip_proto; in hclge_fd_get_tcpip4_tuple()
6280 rule->tuples.src_ip[IPV4_INDEX] = in hclge_fd_get_ip4_tuple()
6285 rule->tuples.dst_ip[IPV4_INDEX] = in hclge_fd_get_ip4_tuple()
6290 rule->tuples.ip_tos = fs->h_u.usr_ip4_spec.tos; in hclge_fd_get_ip4_tuple()
6293 rule->tuples.ip_proto = fs->h_u.usr_ip4_spec.proto; in hclge_fd_get_ip4_tuple()
6296 rule->tuples.ether_proto = ETH_P_IP; in hclge_fd_get_ip4_tuple()
6304 be32_to_cpu_array(rule->tuples.src_ip, fs->h_u.tcp_ip6_spec.ip6src, in hclge_fd_get_tcpip6_tuple()
6309 be32_to_cpu_array(rule->tuples.dst_ip, fs->h_u.tcp_ip6_spec.ip6dst, in hclge_fd_get_tcpip6_tuple()
6314 rule->tuples.src_port = be16_to_cpu(fs->h_u.tcp_ip6_spec.psrc); in hclge_fd_get_tcpip6_tuple()
6317 rule->tuples.dst_port = be16_to_cpu(fs->h_u.tcp_ip6_spec.pdst); in hclge_fd_get_tcpip6_tuple()
6320 rule->tuples.ether_proto = ETH_P_IPV6; in hclge_fd_get_tcpip6_tuple()
6323 rule->tuples.ip_tos = fs->h_u.tcp_ip6_spec.tclass; in hclge_fd_get_tcpip6_tuple()
6326 rule->tuples.ip_proto = ip_proto; in hclge_fd_get_tcpip6_tuple()
6334 be32_to_cpu_array(rule->tuples.src_ip, fs->h_u.usr_ip6_spec.ip6src, in hclge_fd_get_ip6_tuple()
6339 be32_to_cpu_array(rule->tuples.dst_ip, fs->h_u.usr_ip6_spec.ip6dst, in hclge_fd_get_ip6_tuple()
6344 rule->tuples.ip_proto = fs->h_u.usr_ip6_spec.l4_proto; in hclge_fd_get_ip6_tuple()
6347 rule->tuples.ip_tos = fs->h_u.tcp_ip6_spec.tclass; in hclge_fd_get_ip6_tuple()
6350 rule->tuples.ether_proto = ETH_P_IPV6; in hclge_fd_get_ip6_tuple()
6358 ether_addr_copy(rule->tuples.src_mac, fs->h_u.ether_spec.h_source); in hclge_fd_get_ether_tuple()
6361 ether_addr_copy(rule->tuples.dst_mac, fs->h_u.ether_spec.h_dest); in hclge_fd_get_ether_tuple()
6364 rule->tuples.ether_proto = be16_to_cpu(fs->h_u.ether_spec.h_proto); in hclge_fd_get_ether_tuple()
6373 rule->tuples.l2_user_def = info->data; in hclge_fd_get_user_def_tuple()
6377 rule->tuples.l3_user_def = info->data; in hclge_fd_get_user_def_tuple()
6381 rule->tuples.l4_user_def = (u32)info->data << 16; in hclge_fd_get_user_def_tuple()
6431 rule->tuples.vlan_tag1 = be16_to_cpu(fs->h_ext.vlan_tci); in hclge_fd_get_tuple()
6437 ether_addr_copy(rule->tuples.dst_mac, fs->h_ext.h_dest); in hclge_fd_get_tuple()
6725 spec->ip4src = cpu_to_be32(rule->tuples.src_ip[IPV4_INDEX]); in hclge_fd_get_tcpip4_info()
6729 spec->ip4dst = cpu_to_be32(rule->tuples.dst_ip[IPV4_INDEX]); in hclge_fd_get_tcpip4_info()
6733 spec->psrc = cpu_to_be16(rule->tuples.src_port); in hclge_fd_get_tcpip4_info()
6737 spec->pdst = cpu_to_be16(rule->tuples.dst_port); in hclge_fd_get_tcpip4_info()
6741 spec->tos = rule->tuples.ip_tos; in hclge_fd_get_tcpip4_info()
6750 spec->ip4src = cpu_to_be32(rule->tuples.src_ip[IPV4_INDEX]); in hclge_fd_get_ip4_info()
6754 spec->ip4dst = cpu_to_be32(rule->tuples.dst_ip[IPV4_INDEX]); in hclge_fd_get_ip4_info()
6758 spec->tos = rule->tuples.ip_tos; in hclge_fd_get_ip4_info()
6762 spec->proto = rule->tuples.ip_proto; in hclge_fd_get_ip4_info()
6774 rule->tuples.src_ip, IPV6_SIZE); in hclge_fd_get_tcpip6_info()
6776 rule->tuples.dst_ip, IPV6_SIZE); in hclge_fd_get_tcpip6_info()
6789 spec->tclass = rule->tuples.ip_tos; in hclge_fd_get_tcpip6_info()
6793 spec->psrc = cpu_to_be16(rule->tuples.src_port); in hclge_fd_get_tcpip6_info()
6797 spec->pdst = cpu_to_be16(rule->tuples.dst_port); in hclge_fd_get_tcpip6_info()
6806 cpu_to_be32_array(spec->ip6src, rule->tuples.src_ip, IPV6_SIZE); in hclge_fd_get_ip6_info()
6807 cpu_to_be32_array(spec->ip6dst, rule->tuples.dst_ip, IPV6_SIZE); in hclge_fd_get_ip6_info()
6820 spec->tclass = rule->tuples.ip_tos; in hclge_fd_get_ip6_info()
6824 spec->l4_proto = rule->tuples.ip_proto; in hclge_fd_get_ip6_info()
6833 ether_addr_copy(spec->h_source, rule->tuples.src_mac); in hclge_fd_get_ether_info()
6834 ether_addr_copy(spec->h_dest, rule->tuples.dst_mac); in hclge_fd_get_ether_info()
6846 spec->h_proto = cpu_to_be16(rule->tuples.ether_proto); in hclge_fd_get_ether_info()
6873 fs->h_ext.vlan_tci = cpu_to_be16(rule->tuples.vlan_tag1); in hclge_fd_get_ext_info()
6882 ether_addr_copy(fs->h_ext.h_dest, rule->tuples.dst_mac); in hclge_fd_get_ext_info()
7021 struct hclge_fd_rule_tuples *tuples) in hclge_fd_get_flow_tuples() argument
7026 tuples->ether_proto = be16_to_cpu(fkeys->basic.n_proto); in hclge_fd_get_flow_tuples()
7027 tuples->ip_proto = fkeys->basic.ip_proto; in hclge_fd_get_flow_tuples()
7028 tuples->dst_port = be16_to_cpu(fkeys->ports.dst); in hclge_fd_get_flow_tuples()
7031 tuples->src_ip[3] = be32_to_cpu(fkeys->addrs.v4addrs.src); in hclge_fd_get_flow_tuples()
7032 tuples->dst_ip[3] = be32_to_cpu(fkeys->addrs.v4addrs.dst); in hclge_fd_get_flow_tuples()
7037 tuples->src_ip[i] = be32_to_cpu(flow_ip6_src[i]); in hclge_fd_get_flow_tuples()
7038 tuples->dst_ip[i] = be32_to_cpu(flow_ip6_dst[i]); in hclge_fd_get_flow_tuples()
7046 const struct hclge_fd_rule_tuples *tuples) in hclge_fd_search_flow_keys() argument
7052 if (!memcmp(tuples, &rule->tuples, sizeof(*tuples))) in hclge_fd_search_flow_keys()
7059 static void hclge_fd_build_arfs_rule(const struct hclge_fd_rule_tuples *tuples, in hclge_fd_build_arfs_rule() argument
7069 if (tuples->ether_proto == ETH_P_IP) { in hclge_fd_build_arfs_rule()
7070 if (tuples->ip_proto == IPPROTO_TCP) in hclge_fd_build_arfs_rule()
7075 if (tuples->ip_proto == IPPROTO_TCP) in hclge_fd_build_arfs_rule()
7080 memcpy(&rule->tuples, tuples, sizeof(rule->tuples)); in hclge_fd_build_arfs_rule()
7218 rule->tuples.ether_proto = ethtype_key; in hclge_get_cls_key_basic()
7220 rule->tuples.ip_proto = match.key->ip_proto; in hclge_get_cls_key_basic()
7235 ether_addr_copy(rule->tuples.dst_mac, match.key->dst); in hclge_get_cls_key_mac()
7237 ether_addr_copy(rule->tuples.src_mac, match.key->src); in hclge_get_cls_key_mac()
7252 rule->tuples.vlan_tag1 = match.key->vlan_id | in hclge_get_cls_key_vlan()
7277 rule->tuples.src_ip[IPV4_INDEX] = be32_to_cpu(match.key->src); in hclge_get_cls_key_ip()
7280 rule->tuples.dst_ip[IPV4_INDEX] = be32_to_cpu(match.key->dst); in hclge_get_cls_key_ip()
7287 be32_to_cpu_array(rule->tuples.src_ip, match.key->src.s6_addr32, in hclge_get_cls_key_ip()
7291 be32_to_cpu_array(rule->tuples.dst_ip, match.key->dst.s6_addr32, in hclge_get_cls_key_ip()
7309 rule->tuples.src_port = be16_to_cpu(match.key->src); in hclge_get_cls_key_port()
7311 rule->tuples.dst_port = be16_to_cpu(match.key->dst); in hclge_get_cls_key_port()