History

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.

Leon Romanovsky committed 6 years ago

Commit 21528621 parent ac42a5e2 files · +17 −17Browse files

Unified · Split

2 files
  1. drivers/infiniband/hw/mlx5/mlx5_ib.h +17 −0
  2. include/linux/mlx5/driver.h +0 −17
drivers/infiniband/hw/mlx5/mlx5_ib.h+17−0
@@ -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
131struct 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
131struct mlx5_ib_ucontext {148struct 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;
include/linux/mlx5/driver.h+0−17
@@ -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
216struct 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
233struct mlx5_cmd_first {216struct mlx5_cmd_first {
234 __be32 data[4];217 __be32 data[4];
235};218};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t