Lines Matching refs:tuples

339 	  offsetof(struct hclge_fd_rule, tuples.dst_mac),
342 offsetof(struct hclge_fd_rule, tuples.src_mac),
345 offsetof(struct hclge_fd_rule, tuples.vlan_tag1),
349 offsetof(struct hclge_fd_rule, tuples.ether_proto),
352 offsetof(struct hclge_fd_rule, tuples.l2_user_def),
355 offsetof(struct hclge_fd_rule, tuples.ip_tos),
358 offsetof(struct hclge_fd_rule, tuples.ip_proto),
361 offsetof(struct hclge_fd_rule, tuples.src_ip),
364 offsetof(struct hclge_fd_rule, tuples.dst_ip),
367 offsetof(struct hclge_fd_rule, tuples.l3_user_def),
370 offsetof(struct hclge_fd_rule, tuples.src_port),
373 offsetof(struct hclge_fd_rule, tuples.dst_port),
376 offsetof(struct hclge_fd_rule, tuples.l4_user_def),
6173 rule->tuples.src_ip[IPV4_INDEX] = in hclge_fd_get_tcpip4_tuple()
6178 rule->tuples.dst_ip[IPV4_INDEX] = in hclge_fd_get_tcpip4_tuple()
6183 rule->tuples.src_port = be16_to_cpu(fs->h_u.tcp_ip4_spec.psrc); in hclge_fd_get_tcpip4_tuple()
6186 rule->tuples.dst_port = be16_to_cpu(fs->h_u.tcp_ip4_spec.pdst); in hclge_fd_get_tcpip4_tuple()
6189 rule->tuples.ip_tos = fs->h_u.tcp_ip4_spec.tos; in hclge_fd_get_tcpip4_tuple()
6192 rule->tuples.ether_proto = ETH_P_IP; in hclge_fd_get_tcpip4_tuple()
6195 rule->tuples.ip_proto = ip_proto; in hclge_fd_get_tcpip4_tuple()
6202 rule->tuples.src_ip[IPV4_INDEX] = in hclge_fd_get_ip4_tuple()
6207 rule->tuples.dst_ip[IPV4_INDEX] = in hclge_fd_get_ip4_tuple()
6212 rule->tuples.ip_tos = fs->h_u.usr_ip4_spec.tos; in hclge_fd_get_ip4_tuple()
6215 rule->tuples.ip_proto = fs->h_u.usr_ip4_spec.proto; in hclge_fd_get_ip4_tuple()
6218 rule->tuples.ether_proto = ETH_P_IP; in hclge_fd_get_ip4_tuple()
6225 be32_to_cpu_array(rule->tuples.src_ip, fs->h_u.tcp_ip6_spec.ip6src, in hclge_fd_get_tcpip6_tuple()
6230 be32_to_cpu_array(rule->tuples.dst_ip, fs->h_u.tcp_ip6_spec.ip6dst, in hclge_fd_get_tcpip6_tuple()
6235 rule->tuples.src_port = be16_to_cpu(fs->h_u.tcp_ip6_spec.psrc); in hclge_fd_get_tcpip6_tuple()
6238 rule->tuples.dst_port = be16_to_cpu(fs->h_u.tcp_ip6_spec.pdst); in hclge_fd_get_tcpip6_tuple()
6241 rule->tuples.ether_proto = ETH_P_IPV6; in hclge_fd_get_tcpip6_tuple()
6244 rule->tuples.ip_tos = fs->h_u.tcp_ip6_spec.tclass; in hclge_fd_get_tcpip6_tuple()
6247 rule->tuples.ip_proto = ip_proto; in hclge_fd_get_tcpip6_tuple()
6254 be32_to_cpu_array(rule->tuples.src_ip, fs->h_u.usr_ip6_spec.ip6src, in hclge_fd_get_ip6_tuple()
6259 be32_to_cpu_array(rule->tuples.dst_ip, fs->h_u.usr_ip6_spec.ip6dst, in hclge_fd_get_ip6_tuple()
6264 rule->tuples.ip_proto = fs->h_u.usr_ip6_spec.l4_proto; in hclge_fd_get_ip6_tuple()
6267 rule->tuples.ip_tos = fs->h_u.tcp_ip6_spec.tclass; in hclge_fd_get_ip6_tuple()
6270 rule->tuples.ether_proto = ETH_P_IPV6; in hclge_fd_get_ip6_tuple()
6277 ether_addr_copy(rule->tuples.src_mac, fs->h_u.ether_spec.h_source); in hclge_fd_get_ether_tuple()
6280 ether_addr_copy(rule->tuples.dst_mac, fs->h_u.ether_spec.h_dest); in hclge_fd_get_ether_tuple()
6283 rule->tuples.ether_proto = be16_to_cpu(fs->h_u.ether_spec.h_proto); in hclge_fd_get_ether_tuple()
6292 rule->tuples.l2_user_def = info->data; in hclge_fd_get_user_def_tuple()
6296 rule->tuples.l3_user_def = info->data; in hclge_fd_get_user_def_tuple()
6300 rule->tuples.l4_user_def = (u32)info->data << 16; in hclge_fd_get_user_def_tuple()
6349 rule->tuples.vlan_tag1 = be16_to_cpu(fs->h_ext.vlan_tci); in hclge_fd_get_tuple()
6355 ether_addr_copy(rule->tuples.dst_mac, fs->h_ext.h_dest); in hclge_fd_get_tuple()
6643 spec->ip4src = cpu_to_be32(rule->tuples.src_ip[IPV4_INDEX]); in hclge_fd_get_tcpip4_info()
6647 spec->ip4dst = cpu_to_be32(rule->tuples.dst_ip[IPV4_INDEX]); in hclge_fd_get_tcpip4_info()
6651 spec->psrc = cpu_to_be16(rule->tuples.src_port); in hclge_fd_get_tcpip4_info()
6655 spec->pdst = cpu_to_be16(rule->tuples.dst_port); in hclge_fd_get_tcpip4_info()
6659 spec->tos = rule->tuples.ip_tos; in hclge_fd_get_tcpip4_info()
6668 spec->ip4src = cpu_to_be32(rule->tuples.src_ip[IPV4_INDEX]); in hclge_fd_get_ip4_info()
6672 spec->ip4dst = cpu_to_be32(rule->tuples.dst_ip[IPV4_INDEX]); in hclge_fd_get_ip4_info()
6676 spec->tos = rule->tuples.ip_tos; in hclge_fd_get_ip4_info()
6680 spec->proto = rule->tuples.ip_proto; in hclge_fd_get_ip4_info()
6692 rule->tuples.src_ip, IPV6_SIZE); in hclge_fd_get_tcpip6_info()
6694 rule->tuples.dst_ip, IPV6_SIZE); in hclge_fd_get_tcpip6_info()
6707 spec->tclass = rule->tuples.ip_tos; in hclge_fd_get_tcpip6_info()
6711 spec->psrc = cpu_to_be16(rule->tuples.src_port); in hclge_fd_get_tcpip6_info()
6715 spec->pdst = cpu_to_be16(rule->tuples.dst_port); in hclge_fd_get_tcpip6_info()
6724 cpu_to_be32_array(spec->ip6src, rule->tuples.src_ip, IPV6_SIZE); in hclge_fd_get_ip6_info()
6725 cpu_to_be32_array(spec->ip6dst, rule->tuples.dst_ip, IPV6_SIZE); in hclge_fd_get_ip6_info()
6738 spec->tclass = rule->tuples.ip_tos; in hclge_fd_get_ip6_info()
6742 spec->l4_proto = rule->tuples.ip_proto; in hclge_fd_get_ip6_info()
6751 ether_addr_copy(spec->h_source, rule->tuples.src_mac); in hclge_fd_get_ether_info()
6752 ether_addr_copy(spec->h_dest, rule->tuples.dst_mac); in hclge_fd_get_ether_info()
6764 spec->h_proto = cpu_to_be16(rule->tuples.ether_proto); in hclge_fd_get_ether_info()
6791 fs->h_ext.vlan_tci = cpu_to_be16(rule->tuples.vlan_tag1); in hclge_fd_get_ext_info()
6800 ether_addr_copy(fs->h_ext.h_dest, rule->tuples.dst_mac); in hclge_fd_get_ext_info()
6939 struct hclge_fd_rule_tuples *tuples) in hclge_fd_get_flow_tuples() argument
6944 tuples->ether_proto = be16_to_cpu(fkeys->basic.n_proto); in hclge_fd_get_flow_tuples()
6945 tuples->ip_proto = fkeys->basic.ip_proto; in hclge_fd_get_flow_tuples()
6946 tuples->dst_port = be16_to_cpu(fkeys->ports.dst); in hclge_fd_get_flow_tuples()
6949 tuples->src_ip[3] = be32_to_cpu(fkeys->addrs.v4addrs.src); in hclge_fd_get_flow_tuples()
6950 tuples->dst_ip[3] = be32_to_cpu(fkeys->addrs.v4addrs.dst); in hclge_fd_get_flow_tuples()
6955 tuples->src_ip[i] = be32_to_cpu(flow_ip6_src[i]); in hclge_fd_get_flow_tuples()
6956 tuples->dst_ip[i] = be32_to_cpu(flow_ip6_dst[i]); in hclge_fd_get_flow_tuples()
6964 const struct hclge_fd_rule_tuples *tuples) in hclge_fd_search_flow_keys() argument
6970 if (!memcmp(tuples, &rule->tuples, sizeof(*tuples))) in hclge_fd_search_flow_keys()
6977 static void hclge_fd_build_arfs_rule(const struct hclge_fd_rule_tuples *tuples, in hclge_fd_build_arfs_rule() argument
6987 if (tuples->ether_proto == ETH_P_IP) { in hclge_fd_build_arfs_rule()
6988 if (tuples->ip_proto == IPPROTO_TCP) in hclge_fd_build_arfs_rule()
6993 if (tuples->ip_proto == IPPROTO_TCP) in hclge_fd_build_arfs_rule()
6998 memcpy(&rule->tuples, tuples, sizeof(rule->tuples)); in hclge_fd_build_arfs_rule()
7136 rule->tuples.ether_proto = ethtype_key; in hclge_get_cls_key_basic()
7138 rule->tuples.ip_proto = match.key->ip_proto; in hclge_get_cls_key_basic()
7153 ether_addr_copy(rule->tuples.dst_mac, match.key->dst); in hclge_get_cls_key_mac()
7155 ether_addr_copy(rule->tuples.src_mac, match.key->src); in hclge_get_cls_key_mac()
7170 rule->tuples.vlan_tag1 = match.key->vlan_id | in hclge_get_cls_key_vlan()
7195 rule->tuples.src_ip[IPV4_INDEX] = be32_to_cpu(match.key->src); in hclge_get_cls_key_ip()
7198 rule->tuples.dst_ip[IPV4_INDEX] = be32_to_cpu(match.key->dst); in hclge_get_cls_key_ip()
7205 be32_to_cpu_array(rule->tuples.src_ip, match.key->src.s6_addr32, in hclge_get_cls_key_ip()
7209 be32_to_cpu_array(rule->tuples.dst_ip, match.key->dst.s6_addr32, in hclge_get_cls_key_ip()
7227 rule->tuples.src_port = be16_to_cpu(match.key->src); in hclge_get_cls_key_port()
7229 rule->tuples.dst_port = be16_to_cpu(match.key->dst); in hclge_get_cls_key_port()