mirror of https://gitee.com/openkylin/linux.git
IB/mlx5: Limit the scope of struct mlx5_bfreg_info to mlx5_ib
struct mlx5_bfreg_info is used by mlx5_ib only but is exposed to both RDMA and netdev parts of mlx5 driver. Move that struct to mlx5_ib namespace, clean vertical space alignment and convert lib_uar_4k from bool to bitfield. Link: https://lore.kernel.org/r/20200324060143.1569116-5-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
ac42a5ee92
commit
2152862298
|
@ -128,6 +128,23 @@ enum mlx5_ib_mmap_type {
|
||||||
MLX5_IB_MMAP_TYPE_UAR_NC = 4,
|
MLX5_IB_MMAP_TYPE_UAR_NC = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct mlx5_bfreg_info {
|
||||||
|
u32 *sys_pages;
|
||||||
|
int num_low_latency_bfregs;
|
||||||
|
unsigned int *count;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* protect bfreg allocation data structs
|
||||||
|
*/
|
||||||
|
struct mutex lock;
|
||||||
|
u32 ver;
|
||||||
|
u8 lib_uar_4k : 1;
|
||||||
|
u32 num_sys_pages;
|
||||||
|
u32 num_static_sys_pages;
|
||||||
|
u32 total_num_bfregs;
|
||||||
|
u32 num_dyn_bfregs;
|
||||||
|
};
|
||||||
|
|
||||||
struct mlx5_ib_ucontext {
|
struct mlx5_ib_ucontext {
|
||||||
struct ib_ucontext ibucontext;
|
struct ib_ucontext ibucontext;
|
||||||
struct list_head db_page_list;
|
struct list_head db_page_list;
|
||||||
|
|
|
@ -213,23 +213,6 @@ enum mlx5_port_status {
|
||||||
MLX5_PORT_DOWN = 2,
|
MLX5_PORT_DOWN = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mlx5_bfreg_info {
|
|
||||||
u32 *sys_pages;
|
|
||||||
int num_low_latency_bfregs;
|
|
||||||
unsigned int *count;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* protect bfreg allocation data structs
|
|
||||||
*/
|
|
||||||
struct mutex lock;
|
|
||||||
u32 ver;
|
|
||||||
bool lib_uar_4k;
|
|
||||||
u32 num_sys_pages;
|
|
||||||
u32 num_static_sys_pages;
|
|
||||||
u32 total_num_bfregs;
|
|
||||||
u32 num_dyn_bfregs;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mlx5_cmd_first {
|
struct mlx5_cmd_first {
|
||||||
__be32 data[4];
|
__be32 data[4];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue