2 * Unix SMB/CIFS implementation.
3 * Wrap Infiniband calls.
5 * Copyright (C) Sven Oehme <oehmes@de.ibm.com> 2006
7 * Major code contributions by Peter Somogyi <psomogyi@gamax.hu>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 char *msg; /* initialized in ibw_init_memory once per connection */
31 int wr_id; /* position in wr_index list; also used as wr id */
32 struct _ibw_wr *next, *prev; /* in wr_list_avail or wr_list_used */
36 struct event_context *ectx;
40 struct rdma_cm_id *cm_id; /* server cm id */
42 struct rdma_event_channel *cm_channel;
43 struct fd_event *cm_channel_event;
46 enum iwint_state_ctx state2;
48 ibw_connstate_fn_t connstate_func; /* see ibw_init */
49 ibw_receive_fn_t receive_func; /* see ibw_init */
51 long pagesize; /* sysconf result for memalign */
52 int qsize; /* opts.max_send_wr + opts.max_recv_wr */
53 int max_msg_size; /* see ibw_init */
56 struct ibw_conn_priv {
57 struct ibv_comp_channel *verbs_channel;
58 struct fd_event *verbs_channel_event;
60 struct rdma_cm_id *cm_id; /* client's cm id */
63 struct ibv_cq *cq; /* qp is in cm_id */
65 char *buf; /* fixed size (qsize * opts.max_msg_size) buffer for send/recv */
66 struct ibw_wr *wr_list_avail;
67 struct ibw_wr *wr_list_used;
68 struct ibw_wr **wr_index; /* array[0..(qsize-1)] of (ibw_wr *) */