summaryrefslogtreecommitdiff
path: root/ctdb/ib/ibwrapper_internal.h
diff options
context:
space:
mode:
authorPeter Somogyi <psomogyi@gamax.hu>2006-12-13 11:02:49 +0100
committerPeter Somogyi <psomogyi@gamax.hu>2006-12-13 11:02:49 +0100
commit6df8352035c81fd6921a49d07068212956ec8d9f (patch)
tree18f40f0aa372433f00f5502ec7d0e55b2ba4699f /ctdb/ib/ibwrapper_internal.h
parent4e3beb673e99311e38a08b7f4eadb5a3b21464db (diff)
downloadsamba-6df8352035c81fd6921a49d07068212956ec8d9f.tar.gz
Using struct <type> instead of typedefs.
(This used to be ctdb commit d830c1ca25b13e82357f439a2ba39540f81a6ecd)
Diffstat (limited to 'ctdb/ib/ibwrapper_internal.h')
-rw-r--r--ctdb/ib/ibwrapper_internal.h32
1 files changed, 13 insertions, 19 deletions
diff --git a/ctdb/ib/ibwrapper_internal.h b/ctdb/ib/ibwrapper_internal.h
index 4f0f11f605c..b6d8eb2bc2f 100644
--- a/ctdb/ib/ibwrapper_internal.h
+++ b/ctdb/ib/ibwrapper_internal.h
@@ -21,28 +21,21 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-typedef struct _ibw_opts {
+struct ibw_opts {
int max_send_wr;
int max_recv_wr;
-} ibw_opts;
+};
-typedef struct _ibw_wr {
+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 */
struct _ibw_wr *next, *prev; /* in wr_list_avail or wr_list_used */
-} ibw_wr;
+};
-typedef enum {
- IWINT_INIT = 0,
- IWINT_ADDR_RESOLVED,
- IWINT_ROUTE_RESOLVED,
- IWINT_ERROR
-} ibw_state_ctx;
-
-typedef struct _ibw_ctx_priv {
+struct ibw_ctx_priv {
struct event_context *ectx;
- ibw_opts opts;
+ struct ibw_opts opts;
struct rdma_cm_id *cm_id; /* server cm id */
@@ -50,6 +43,7 @@ typedef struct _ibw_ctx_priv {
struct fd_event *cm_channel_event;
struct ibv_pd *pd;
+ enum iwint_state_ctx state2;
ibw_connstate_fn_t connstate_func; /* see ibw_init */
ibw_receive_fn_t receive_func; /* see ibw_init */
@@ -57,9 +51,9 @@ typedef struct _ibw_ctx_priv {
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 ibw_conn_priv {
struct ibv_comp_channel *verbs_channel;
struct fd_event *verbs_channel_event;
@@ -69,8 +63,8 @@ typedef struct _ibw_conn_priv {
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 */
- ibw_wr *wr_list_avail;
- ibw_wr *wr_list_used;
- ibw_wr **wr_index; /* array[0..(qsize-1)] of (ibw_wr *) */
-} 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 *) */
+};