merging tridge's code...
[vlendec/samba-autobuild/.git] / ctdb / ib / ibwrapper_internal.h
index 6e34917755b45680287b712e39c6c87646bf3bd8..a879427a115ffdb49214480e40a03b62e891af6f 100644 (file)
@@ -36,6 +36,8 @@ struct ibw_wr {
        char    *msg_large; /* allocated specially for "large" message */
        struct ibv_mr *mr_large;
 
+       char    *queued_msg; /* set at ibw_send - can be different than above */
+
        struct ibw_wr *next, *prev; /* in wr_list_avail or wr_list_used */
 };
 
@@ -49,8 +51,6 @@ struct ibw_ctx_priv {
        struct rdma_event_channel *cm_channel;
        struct fd_event *cm_channel_event;
 
-       struct ibv_pd          *pd;
-
        ibw_connstate_fn_t connstate_func; /* see ibw_init */
        ibw_receive_fn_t receive_func; /* see ibw_init */
 
@@ -69,6 +69,7 @@ struct ibw_conn_priv {
        struct fd_event *verbs_channel_event;
 
        struct rdma_cm_id *cm_id; /* client's cm id */
+       struct ibv_pd   *pd;
        int     is_accepted;
 
        struct ibv_cq   *cq; /* qp is in cm_id */
@@ -78,6 +79,12 @@ struct ibw_conn_priv {
        struct ibw_wr *wr_list_avail;
        struct ibw_wr *wr_list_used;
        struct ibw_wr **wr_index; /* array[0..(qsize-1)] of (ibw_wr *) */
+       int     wr_sent; /* # of send wrs in the CQ */
+
+       struct ibw_wr *queue;
+       struct ibw_wr *extra_sent;
+       struct ibw_wr *extra_avail;
+       int     extra_max; /* max wr_id in the queue */
 
        /* buf_recv is a ring buffer */
        char *buf_recv; /* max_recv_wr * avg_recv_size */