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.
24 typedef struct _ibw_opts
{
30 typedef struct _ibw_wr
{
31 char *msg
; /* initialized in ibw_init_memory once */
32 ibw_conn
*conn
; /*valid only when in wr_list_used */
33 int wr_id
; /* position in wr_index list; also used as wr id */
34 struct _ibw_wr
*next
, *prev
; /* in wr_list_avail or wr_list_used */
44 typedef struct _ibw_ctx_priv
{
45 struct event_context
*ectx
;
49 struct rdma_cm_id
*cm_id
; /* server cm id */
51 struct rdma_event_channel
*cm_channel
;
52 struct fd_event
*cm_channel_event
;
54 struct rdma_event_channel
*cm_channel
;
55 struct fd_event
*cm_channel_event
;
56 struct ibv_comp_channel
*verbs_channel
;
57 struct fd_event
*verbs_channel_event
;
61 ibw_connstate_fn_t connstate_func
;
62 ibw_receive_fn_t receive_func
;
64 long pagesize
; /* sysconf result for memalign */
67 typedef struct _ibw_conn_priv
{
68 struct rdma_cm_id
*cm_id
; /* client's cm id */
71 struct ibv_cq
*cq
; /* qp is in cm_id */
73 char *buf
; /* fixed size (opts.bufsize) buffer for send/recv */
74 ibw_wr
*wr_list_avail
;
76 ibw_wr
**wr_index
; /* array[0..(max_send_wr + max_recv_wr)-1] of (ibw_wr *) */