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.
Unified · Split
| @@ -128,6 +128,23 @@ enum mlx5_ib_mmap_type { · 127 unmodified lines | |||
| 128 | MLX5_IB_MMAP_TYPE_UAR_NC = 4, | 128 | MLX5_IB_MMAP_TYPE_UAR_NC = 4, |
| 129 | }; | 129 | }; |
| 130 | 130 | ||
| 131 | struct mlx5_bfreg_info { | ||
| 132 | u32 *sys_pages; | ||
| 133 | int num_low_latency_bfregs; | ||
| 134 | unsigned int *count; | ||
| 135 | |||
| 136 | /* | ||
| 137 | * protect bfreg allocation data structs | ||
| 138 | */ | ||
| 139 | struct mutex lock; | ||
| 140 | u32 ver; | ||
| 141 | u8 lib_uar_4k : 1; | ||
| 142 | u32 num_sys_pages; | ||
| 143 | u32 num_static_sys_pages; | ||
| 144 | u32 total_num_bfregs; | ||
| 145 | u32 num_dyn_bfregs; | ||
| 146 | }; | ||
| 147 | |||
| 131 | struct mlx5_ib_ucontext { | 148 | struct mlx5_ib_ucontext { |
| 132 | struct ib_ucontext ibucontext; | 149 | struct ib_ucontext ibucontext; |
| 133 | struct list_head db_page_list; | 150 | struct list_head db_page_list; |
| @@ -213,23 +213,6 @@ enum mlx5_port_status { · 212 unmodified lines | |||
| 213 | MLX5_PORT_DOWN = 2, | 213 | MLX5_PORT_DOWN = 2, |
| 214 | }; | 214 | }; |
| 215 | 215 | ||
| 216 | struct mlx5_bfreg_info { | ||
| 217 | u32 *sys_pages; | ||
| 218 | int num_low_latency_bfregs; | ||
| 219 | unsigned int *count; | ||
| 220 | |||
| 221 | /* | ||
| 222 | * protect bfreg allocation data structs | ||
| 223 | */ | ||
| 224 | struct mutex lock; | ||
| 225 | u32 ver; | ||
| 226 | bool lib_uar_4k; | ||
| 227 | u32 num_sys_pages; | ||
| 228 | u32 num_static_sys_pages; | ||
| 229 | u32 total_num_bfregs; | ||
| 230 | u32 num_dyn_bfregs; | ||
| 231 | }; | ||
| 232 | |||
| 233 | struct mlx5_cmd_first { | 216 | struct mlx5_cmd_first { |
| 234 | __be32 data[4]; | 217 | __be32 data[4]; |
| 235 | }; | 218 | }; |