Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nes_verbs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2006 - 2011 Intel Corporation. All rights reserved.
3  * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
4  *
5  * This software is available to you under a choice of one of two
6  * licenses. You may choose to be licensed under the terms of the GNU
7  * General Public License (GPL) Version 2, available from the file
8  * COPYING in the main directory of this source tree, or the
9  * OpenIB.org BSD license below:
10  *
11  * Redistribution and use in source and binary forms, with or
12  * without modification, are permitted provided that the following
13  * conditions are met:
14  *
15  * - Redistributions of source code must retain the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer.
18  *
19  * - Redistributions in binary form must reproduce the above
20  * copyright notice, this list of conditions and the following
21  * disclaimer in the documentation and/or other materials
22  * provided with the distribution.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31  * SOFTWARE.
32  *
33  */
34 
35 #ifndef NES_VERBS_H
36 #define NES_VERBS_H
37 
38 struct nes_device;
39 
40 #define NES_MAX_USER_DB_REGIONS 4096
41 #define NES_MAX_USER_WQ_REGIONS 4096
42 
43 #define NES_TERM_SENT 0x01
44 #define NES_TERM_RCVD 0x02
45 #define NES_TERM_DONE 0x04
46 
47 struct nes_ucontext {
49  struct nes_device *nesdev;
50  unsigned long mmap_wq_offset;
51  unsigned long mmap_cq_offset; /* to be removed */
52  int index; /* rnic index (minor) */
63 };
64 
65 struct nes_pd {
66  struct ib_pd ibpd;
70 };
71 
72 struct nes_mr {
73  union {
74  struct ib_mr ibmr;
75  struct ib_mw ibmw;
76  struct ib_fmr ibfmr;
77  };
78  struct ib_umem *region;
82 };
83 
84 struct nes_hw_pb {
87 };
88 
89 struct nes_vpbl {
92 };
93 
94 struct nes_root_vpbl {
98 };
99 
100 struct nes_fmr {
101  struct nes_mr nesmr;
104  struct ib_qp *ib_qp;
107 };
108 
109 struct nes_av;
110 
111 struct nes_cq {
112  struct ib_cq ibcq;
113  struct nes_hw_cq hw_cq;
118  u8 pad[3];
120 };
121 
122 struct nes_wq {
124 };
125 
126 struct disconn_work {
128  struct nes_qp *nesqp;
129 };
130 
131 struct iw_cm_id;
132 struct ietf_mpa_frame;
133 
134 struct nes_qp {
135  struct ib_qp ibqp;
137  struct iw_cm_id *cm_id;
138  struct nes_cq *nesscq;
139  struct nes_cq *nesrcq;
140  struct nes_pd *nespd;
141  void *cm_node; /* handle of the node this QP is associated with */
142  void *ietf_frame;
145  struct ib_mr *lsmm_mr;
146  struct nes_hw_qp hwqp;
161  void *pbl_vbase;
163  struct page *page;
187 };
188 #endif /* NES_VERBS_H */