summaryrefslogtreecommitdiff
path: root/ctdb/ib/ibwrapper_internal.h
diff options
context:
space:
mode:
authorPeter Somogyi <psomogyi@gamax.hu>2006-12-18 20:52:49 +0100
committerPeter Somogyi <psomogyi@gamax.hu>2006-12-18 20:52:49 +0100
commit96035955be8bd445a924f3553f24c019e0921e0f (patch)
treeb44890d4a0d77949799c0d0950d8b96f9cf94474 /ctdb/ib/ibwrapper_internal.h
parentee547a0f9aa1642110f4740eaecd552b7ea63539 (diff)
downloadsamba-96035955be8bd445a924f3553f24c019e0921e0f.tar.gz
Modified send logic to allow large messages.
TODO: receiver side. (This used to be ctdb commit 5ca8a53b10990a09390f174bf5eacf07fc5540c2)
Diffstat (limited to 'ctdb/ib/ibwrapper_internal.h')
-rw-r--r--ctdb/ib/ibwrapper_internal.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/ctdb/ib/ibwrapper_internal.h b/ctdb/ib/ibwrapper_internal.h
index 04d82f9565d..b819c483d3d 100644
--- a/ctdb/ib/ibwrapper_internal.h
+++ b/ctdb/ib/ibwrapper_internal.h
@@ -24,11 +24,17 @@
struct ibw_opts {
int max_send_wr;
int max_recv_wr;
+ int avg_send_size;
+ int recv_bufsize;
};
struct ibw_wr {
char *msg; /* initialized in ibw_init_memory once per connection */
int wr_id; /* position in wr_index list; also used as wr id */
+
+ char *msg_large; /* allocated specially for "large" message */
+ struct ibv_mr *mr_large;
+
struct ibw_wr *next, *prev; /* in wr_list_avail or wr_list_used */
};
@@ -48,8 +54,6 @@ struct ibw_ctx_priv {
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 */
};
struct ibw_conn_priv {
@@ -60,10 +64,16 @@ struct ibw_conn_priv {
int is_accepted;
struct ibv_cq *cq; /* qp is in cm_id */
- struct ibv_mr *mr;
- char *buf; /* fixed size (qsize * opts.max_msg_size) buffer for send/recv */
+
+ char *buf_send; /* max_send_wr * avg_send_size */
+ struct ibv_mr *mr_send;
struct ibw_wr *wr_list_avail;
struct ibw_wr *wr_list_used;
struct ibw_wr **wr_index; /* array[0..(qsize-1)] of (ibw_wr *) */
+
+ /* buf_recv is a ring buffer */
+ char *buf_recv; /* max_recv_wr * avg_recv_size */
+ struct ibv_mr *mr_recv;
+ int recv_index; /* index of the next recv buffer */
};