diff options
author | Peter Somogyi <psomogyi@gamax.hu> | 2006-12-12 19:09:16 +0100 |
---|---|---|
committer | Peter Somogyi <psomogyi@gamax.hu> | 2006-12-12 19:09:16 +0100 |
commit | 4e3beb673e99311e38a08b7f4eadb5a3b21464db (patch) | |
tree | 8454c2ee69c05a0905c545d3c7916368156c3f42 /ctdb/ib/ibwrapper_internal.h | |
parent | 96cdb37f7bdbea3b03a30dd56f694a033e2a4cf4 (diff) | |
download | samba-4e3beb673e99311e38a08b7f4eadb5a3b21464db.tar.gz samba-4e3beb673e99311e38a08b7f4eadb5a3b21464db.tar.xz samba-4e3beb673e99311e38a08b7f4eadb5a3b21464db.zip |
Raw implementation done.
Let's start compilation...
(This used to be ctdb commit 24d2a0615a308dee47ae87c5c84e1133858b3d27)
Diffstat (limited to 'ctdb/ib/ibwrapper_internal.h')
-rw-r--r-- | ctdb/ib/ibwrapper_internal.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/ctdb/ib/ibwrapper_internal.h b/ctdb/ib/ibwrapper_internal.h index b022c92c71..4f0f11f605 100644 --- a/ctdb/ib/ibwrapper_internal.h +++ b/ctdb/ib/ibwrapper_internal.h @@ -24,12 +24,10 @@ typedef struct _ibw_opts { int max_send_wr; int max_recv_wr; - int max_msg_size; } ibw_opts; typedef struct _ibw_wr { - char *msg; /* initialized in ibw_init_memory once */ - ibw_conn *conn; /*valid only when in wr_list_used */ + char *msg; /* initialized in ibw_init_memory once per connection */ int wr_id; /* position in wr_index list; also used as wr id */ struct _ibw_wr *next, *prev; /* in wr_list_avail or wr_list_used */ } ibw_wr; @@ -51,28 +49,28 @@ typedef struct _ibw_ctx_priv { struct rdma_event_channel *cm_channel; struct fd_event *cm_channel_event; - struct rdma_event_channel *cm_channel; - struct fd_event *cm_channel_event; - struct ibv_comp_channel *verbs_channel; - struct fd_event *verbs_channel_event; - struct ibv_pd *pd; - ibw_connstate_fn_t connstate_func; - ibw_receive_fn_t receive_func; + ibw_connstate_fn_t connstate_func; /* see ibw_init */ + ibw_receive_fn_t receive_func; /* see ibw_init */ long pagesize; /* sysconf result for memalign */ + int qsize; /* opts.max_send_wr + opts.max_recv_wr */ + int max_msg_size; /* see ibw_init */ } ibw_ctx_priv; typedef struct _ibw_conn_priv { + struct ibv_comp_channel *verbs_channel; + struct fd_event *verbs_channel_event; + struct rdma_cm_id *cm_id; /* client's cm id */ int is_accepted; struct ibv_cq *cq; /* qp is in cm_id */ struct ibv_mr *mr; - char *buf; /* fixed size (opts.bufsize) buffer for send/recv */ + char *buf; /* fixed size (qsize * opts.max_msg_size) buffer for send/recv */ ibw_wr *wr_list_avail; ibw_wr *wr_list_used; - ibw_wr **wr_index; /* array[0..(max_send_wr + max_recv_wr)-1] of (ibw_wr *) */ + ibw_wr **wr_index; /* array[0..(qsize-1)] of (ibw_wr *) */ } ibw_conn_priv; |