IB/mlx5: Add function to read WQE from user-space

Add a helper function mlx5_ib_read_user_wqe to read information from
user-space owned work queues.  The function will be used in a later
patch by the page-fault handling code in mlx5_ib.

Signed-off-by: Haggai Eran <haggaie@mellanox.com>

[ Add stub for ib_umem_copy_from() for CONFIG_INFINIBAND_USER_MEM=n
  - Roland ]

Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Haggai Eran
2014-12-15 18:13:35 -08:00
committed by Roland Dreier
parent c5d76f130b
commit c1395a2a8c
4 changed files with 80 additions and 1 deletions
+3
View File
@@ -189,6 +189,9 @@ struct mlx5_wqe_ctrl_seg {
__be32 imm;
};
#define MLX5_WQE_CTRL_DS_MASK 0x3f
#define MLX5_WQE_DS_UNITS 16
struct mlx5_wqe_xrc_seg {
__be32 xrc_srqn;
u8 rsvd[12];
+4 -1
View File
@@ -98,7 +98,10 @@ static inline struct ib_umem *ib_umem_get(struct ib_ucontext *context,
}
static inline void ib_umem_release(struct ib_umem *umem) { }
static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset,
size_t length) {
return -EINVAL;
}
#endif /* CONFIG_INFINIBAND_USER_MEM */
#endif /* IB_UMEM_H */