@@ -57,4 +57,5 @@ endfunction()
rdma_kernel_provider_abi(
rdma/ib_user_verbs.h
rdma/qedr-abi.h
+ rdma/rdma_user_rxe.h
)
@@ -36,38 +36,18 @@
#define RXE_ABI_H
#include <infiniband/kern-abi.h>
-
-struct mmap_info {
- __u64 offset;
- __u32 size;
- __u32 pad;
-};
-
-struct urxe_create_cq_resp {
- struct ib_uverbs_create_cq_resp ibv_resp;
- struct mmap_info mi;
-};
-
-struct urxe_resize_cq_resp {
- struct ib_uverbs_resize_cq_resp ibv_resp;
- struct mmap_info mi;
-};
-
-struct urxe_create_qp_resp {
- struct ib_uverbs_create_qp_resp ibv_resp;
- struct mmap_info rq_mi;
- struct mmap_info sq_mi;
-};
-
-struct urxe_create_srq_resp {
- struct ib_uverbs_create_srq_resp ibv_resp;
- struct mmap_info mi;
- __u32 srq_num;
-};
-
-struct urxe_modify_srq_cmd {
- struct ibv_modify_srq ibv_cmd;
- __u64 mmap_info_addr;
-};
+#include <rdma/rdma_user_rxe.h>
+#include <kernel-abi/rdma_user_rxe.h>
+
+DECLARE_DRV_CMD(urxe_create_cq, IB_USER_VERBS_CMD_CREATE_CQ,
+ empty, rxe_create_cq_resp);
+DECLARE_DRV_CMD(urxe_create_qp, IB_USER_VERBS_CMD_CREATE_QP,
+ empty, rxe_create_qp_resp);
+DECLARE_DRV_CMD(urxe_create_srq, IB_USER_VERBS_CMD_CREATE_SRQ,
+ empty, rxe_create_srq_resp);
+DECLARE_DRV_CMD(urxe_modify_srq, IB_USER_VERBS_CMD_MODIFY_SRQ,
+ rxe_modify_srq_cmd, empty);
+DECLARE_DRV_CMD(urxe_resize_cq, IB_USER_VERBS_CMD_RESIZE_CQ,
+ empty, rxe_resize_cq_resp);
#endif /* RXE_ABI_H */
@@ -308,9 +308,9 @@ static int rxe_modify_srq(struct ibv_srq *ibsrq,
struct ibv_srq_attr *attr, int attr_mask)
{
struct rxe_srq *srq = to_rsrq(ibsrq);
- struct urxe_modify_srq_cmd cmd;
+ struct urxe_modify_srq cmd;
int rc = 0;
- struct mmap_info mi;
+ struct mminfo mi;
mi.offset = 0;
mi.size = 0;
@@ -59,7 +59,7 @@ struct rxe_context {
struct rxe_cq {
struct ibv_cq ibv_cq;
- struct mmap_info mmap_info;
+ struct mminfo mmap_info;
struct rxe_queue *queue;
pthread_spinlock_t lock;
};
@@ -78,9 +78,9 @@ struct rxe_wq {
struct rxe_qp {
struct ibv_qp ibv_qp;
- struct mmap_info rq_mmap_info;
+ struct mminfo rq_mmap_info;
struct rxe_wq rq;
- struct mmap_info sq_mmap_info;
+ struct mminfo sq_mmap_info;
struct rxe_wq sq;
unsigned int ssn;
};
@@ -89,7 +89,7 @@ struct rxe_qp {
struct rxe_srq {
struct ibv_srq ibv_srq;
- struct mmap_info mmap_info;
+ struct mminfo mmap_info;
struct rxe_wq rq;
uint32_t srq_num;
};