aboutsummaryrefslogtreecommitdiff
path: root/hw/rdma/rdma_rm_defs.h
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2019-04-03 14:33:41 +0300
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>2019-05-04 15:55:56 +0300
commitcdc84058bc6412179b22ce61f29db104cfcba9fc (patch)
treef9e04ea84921b9e5323a6262c5ce580af321ce89 /hw/rdma/rdma_rm_defs.h
parente926c9f1bc8864d4d5ef6613bea76d4f825e30c0 (diff)
hw/rdma: Add support for managing SRQ resource
Adding the required functions and definitions for support managing the shared receive queues (SRQs). Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Message-Id: <20190403113343.26384-3-kamalheib1@gmail.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Diffstat (limited to 'hw/rdma/rdma_rm_defs.h')
-rw-r--r--hw/rdma/rdma_rm_defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h
index e774af5280..7bdd9f291f 100644
--- a/hw/rdma/rdma_rm_defs.h
+++ b/hw/rdma/rdma_rm_defs.h
@@ -33,6 +33,7 @@
#define MAX_QP_RD_ATOM 16
#define MAX_QP_INIT_RD_ATOM 16
#define MAX_AH 64
+#define MAX_SRQ 512
#define MAX_RM_TBL_NAME 16
#define MAX_CONSEQ_EMPTY_POLL_CQ 4096 /* considered as error above this */
@@ -89,6 +90,12 @@ typedef struct RdmaRmQP {
enum ibv_qp_state qp_state;
} RdmaRmQP;
+typedef struct RdmaRmSRQ {
+ RdmaBackendSRQ backend_srq;
+ uint32_t recv_cq_handle;
+ void *opaque;
+} RdmaRmSRQ;
+
typedef struct RdmaRmGid {
union ibv_gid gid;
int backend_gid_index;
@@ -129,6 +136,7 @@ struct RdmaDeviceResources {
RdmaRmResTbl qp_tbl;
RdmaRmResTbl cq_tbl;
RdmaRmResTbl cqe_ctx_tbl;
+ RdmaRmResTbl srq_tbl;
GHashTable *qp_hash; /* Keeps mapping between real and emulated */
QemuMutex lock;
RdmaRmStats stats;