aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/qp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mlx5/qp.h')
-rw-r--r--include/linux/mlx5/qp.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index d51eff713549..f829ad80ff28 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -37,6 +37,9 @@
37#include <linux/mlx5/driver.h> 37#include <linux/mlx5/driver.h>
38 38
39#define MLX5_INVALID_LKEY 0x100 39#define MLX5_INVALID_LKEY 0x100
40#define MLX5_SIG_WQE_SIZE (MLX5_SEND_WQE_BB * 5)
41#define MLX5_DIF_SIZE 8
42#define MLX5_STRIDE_BLOCK_OP 0x400
40 43
41enum mlx5_qp_optpar { 44enum mlx5_qp_optpar {
42 MLX5_QP_OPTPAR_ALT_ADDR_PATH = 1 << 0, 45 MLX5_QP_OPTPAR_ALT_ADDR_PATH = 1 << 0,
@@ -151,6 +154,11 @@ enum {
151 MLX5_SND_DBR = 1, 154 MLX5_SND_DBR = 1,
152}; 155};
153 156
157enum {
158 MLX5_FLAGS_INLINE = 1<<7,
159 MLX5_FLAGS_CHECK_FREE = 1<<5,
160};
161
154struct mlx5_wqe_fmr_seg { 162struct mlx5_wqe_fmr_seg {
155 __be32 flags; 163 __be32 flags;
156 __be32 mem_key; 164 __be32 mem_key;
@@ -278,6 +286,60 @@ struct mlx5_wqe_inline_seg {
278 __be32 byte_count; 286 __be32 byte_count;
279}; 287};
280 288
289struct mlx5_bsf {
290 struct mlx5_bsf_basic {
291 u8 bsf_size_sbs;
292 u8 check_byte_mask;
293 union {
294 u8 copy_byte_mask;
295 u8 bs_selector;
296 u8 rsvd_wflags;
297 } wire;
298 union {
299 u8 bs_selector;
300 u8 rsvd_mflags;
301 } mem;
302 __be32 raw_data_size;
303 __be32 w_bfs_psv;
304 __be32 m_bfs_psv;
305 } basic;
306 struct mlx5_bsf_ext {
307 __be32 t_init_gen_pro_size;
308 __be32 rsvd_epi_size;
309 __be32 w_tfs_psv;
310 __be32 m_tfs_psv;
311 } ext;
312 struct mlx5_bsf_inl {
313 __be32 w_inl_vld;
314 __be32 w_rsvd;
315 __be64 w_block_format;
316 __be32 m_inl_vld;
317 __be32 m_rsvd;
318 __be64 m_block_format;
319 } inl;
320};
321
322struct mlx5_klm {
323 __be32 bcount;
324 __be32 key;
325 __be64 va;
326};
327
328struct mlx5_stride_block_entry {
329 __be16 stride;
330 __be16 bcount;
331 __be32 key;
332 __be64 va;
333};
334
335struct mlx5_stride_block_ctrl_seg {
336 __be32 bcount_per_cycle;
337 __be32 op;
338 __be32 repeat_count;
339 u16 rsvd;
340 __be16 num_entries;
341};
342
281struct mlx5_core_qp { 343struct mlx5_core_qp {
282 void (*event) (struct mlx5_core_qp *, int); 344 void (*event) (struct mlx5_core_qp *, int);
283 int qpn; 345 int qpn;
@@ -444,6 +506,11 @@ static inline struct mlx5_core_qp *__mlx5_qp_lookup(struct mlx5_core_dev *dev, u
444 return radix_tree_lookup(&dev->priv.qp_table.tree, qpn); 506 return radix_tree_lookup(&dev->priv.qp_table.tree, qpn);
445} 507}
446 508
509static inline struct mlx5_core_mr *__mlx5_mr_lookup(struct mlx5_core_dev *dev, u32 key)
510{
511 return radix_tree_lookup(&dev->priv.mr_table.tree, key);
512}
513
447int mlx5_core_create_qp(struct mlx5_core_dev *dev, 514int mlx5_core_create_qp(struct mlx5_core_dev *dev,
448 struct mlx5_core_qp *qp, 515 struct mlx5_core_qp *qp,
449 struct mlx5_create_qp_mbox_in *in, 516 struct mlx5_create_qp_mbox_in *in,