diff options
| author | Haggai Eran <haggaie@mellanox.com> | 2014-12-11 10:04:14 -0500 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2014-12-15 21:13:35 -0500 |
| commit | c1395a2a8c01e8a919e47d64eb3d23d00e824b8b (patch) | |
| tree | 14c4baa698685dc3e59412a37e9774be1dc8fe09 /include | |
| parent | c5d76f130b286682b64c659eaf6af701e3d79a7b (diff) | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mlx5/qp.h | 3 | ||||
| -rw-r--r-- | include/rdma/ib_umem.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h index 3fa075daeb1d..67f4b9660b06 100644 --- a/include/linux/mlx5/qp.h +++ b/include/linux/mlx5/qp.h | |||
| @@ -189,6 +189,9 @@ struct mlx5_wqe_ctrl_seg { | |||
| 189 | __be32 imm; | 189 | __be32 imm; |
| 190 | }; | 190 | }; |
| 191 | 191 | ||
| 192 | #define MLX5_WQE_CTRL_DS_MASK 0x3f | ||
| 193 | #define MLX5_WQE_DS_UNITS 16 | ||
| 194 | |||
| 192 | struct mlx5_wqe_xrc_seg { | 195 | struct mlx5_wqe_xrc_seg { |
| 193 | __be32 xrc_srqn; | 196 | __be32 xrc_srqn; |
| 194 | u8 rsvd[12]; | 197 | u8 rsvd[12]; |
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h index 45bb04bc88cd..a51f4091489a 100644 --- a/include/rdma/ib_umem.h +++ b/include/rdma/ib_umem.h | |||
| @@ -98,7 +98,10 @@ static inline struct ib_umem *ib_umem_get(struct ib_ucontext *context, | |||
| 98 | } | 98 | } |
| 99 | static inline void ib_umem_release(struct ib_umem *umem) { } | 99 | static inline void ib_umem_release(struct ib_umem *umem) { } |
| 100 | static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; } | 100 | static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; } |
| 101 | 101 | static inline int ib_umem_copy_from(void *dst, struct ib_umem *umem, size_t offset, | |
| 102 | size_t length) { | ||
| 103 | return -EINVAL; | ||
| 104 | } | ||
| 102 | #endif /* CONFIG_INFINIBAND_USER_MEM */ | 105 | #endif /* CONFIG_INFINIBAND_USER_MEM */ |
| 103 | 106 | ||
| 104 | #endif /* IB_UMEM_H */ | 107 | #endif /* IB_UMEM_H */ |
