To commit ?? ("IB/hfi1: Move receive work queue struct into uapi directory") Signed-off-by: "Kamenee Arumugam" <kamenee.arumugam@xxxxxxxxx> --- kernel-headers/rdma/rvt-abi.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/kernel-headers/rdma/rvt-abi.h b/kernel-headers/rdma/rvt-abi.h index c30f2fe..2e14075 100644 --- a/kernel-headers/rdma/rvt-abi.h +++ b/kernel-headers/rdma/rvt-abi.h @@ -10,6 +10,7 @@ #include <linux/types.h> #include <rdma/ib_user_verbs.h> +#include <infiniband/verbs.h> #ifndef RDMA_ATOMIC_UAPI #define RDMA_ATOMIC_UAPI(_type, _name) _type _name #endif @@ -28,4 +29,31 @@ struct rvt_cq_wc { struct ib_uverbs_wc uqueue[0]; }; +/* + * Receive work request queue entry. + * The size of the sg_list is determined when the QP (or SRQ) is created + * and stored in qp->r_rq.max_sge (or srq->rq.max_sge). + */ +struct rvt_rwqe { + __u64 wr_id; + __u8 num_sge; + __u8 padding[7]; + struct ibv_sge sg_list[0]; +}; + +/* + * This structure is used to contain the head pointer, tail pointer, + * and receive work queue entries as a single memory allocation so + * it can be mmap'ed into user space. + * Note that the wq array elements are variable size so you can't + * just index into the array to get the N'th element; + * use get_rwqe_ptr() instead. + */ +struct rvt_rwq { + /* new work requests posted to the head */ + RDMA_ATOMIC_UAPI(__u32, head); + /* receives pull requests from here. */ + RDMA_ATOMIC_UAPI(__u32, tail); + struct rvt_rwqe wq[0]; +}; #endif /* RVT_ABI_USER_H */