net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap

In order to avoid temporary large structs on the stack,
allocate them dynamically.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tal Alon <talal@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eran Ben Elisha
2017-08-28 16:38:20 +03:00
committed by David S. Miller
parent b74fd306ef
commit c73c8b1e47
6 changed files with 157 additions and 156 deletions

View File

@@ -518,6 +518,14 @@ struct mlx4_phys_caps {
u32 base_tunnel_sqpn;
};
struct mlx4_spec_qps {
u32 qp0_qkey;
u32 qp0_proxy;
u32 qp0_tunnel;
u32 qp1_proxy;
u32 qp1_tunnel;
};
struct mlx4_caps {
u64 fw_ver;
u32 function;
@@ -547,11 +555,7 @@ struct mlx4_caps {
int max_qp_init_rdma;
int max_qp_dest_rdma;
int max_tc_eth;
u32 *qp0_qkey;
u32 *qp0_proxy;
u32 *qp1_proxy;
u32 *qp0_tunnel;
u32 *qp1_tunnel;
struct mlx4_spec_qps *spec_qps;
int num_srqs;
int max_srq_wqes;
int max_srq_sge;