Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ib_user_verbs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2005 Topspin Communications. All rights reserved.
3  * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved.
4  * Copyright (c) 2005 PathScale, Inc. All rights reserved.
5  * Copyright (c) 2006 Mellanox Technologies. All rights reserved.
6  *
7  * This software is available to you under a choice of one of two
8  * licenses. You may choose to be licensed under the terms of the GNU
9  * General Public License (GPL) Version 2, available from the file
10  * COPYING in the main directory of this source tree, or the
11  * OpenIB.org BSD license below:
12  *
13  * Redistribution and use in source and binary forms, with or
14  * without modification, are permitted provided that the following
15  * conditions are met:
16  *
17  * - Redistributions of source code must retain the above
18  * copyright notice, this list of conditions and the following
19  * disclaimer.
20  *
21  * - Redistributions in binary form must reproduce the above
22  * copyright notice, this list of conditions and the following
23  * disclaimer in the documentation and/or other materials
24  * provided with the distribution.
25  *
26  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33  * SOFTWARE.
34  */
35 
36 #ifndef IB_USER_VERBS_H
37 #define IB_USER_VERBS_H
38 
39 #include <linux/types.h>
40 
41 /*
42  * Increment this value if any changes that break userspace ABI
43  * compatibility are made.
44  */
45 #define IB_USER_VERBS_ABI_VERSION 6
46 
47 enum {
89 };
90 
91 /*
92  * Make sure that all structs defined in this file remain laid out so
93  * that they pack the same way on 32-bit and 64-bit architectures (to
94  * avoid incompatibility between 32-bit userspace and 64-bit kernels).
95  * Specifically:
96  * - Do not use pointer types -- pass pointers in __u64 instead.
97  * - Make sure that any structure larger than 4 bytes is padded to a
98  * multiple of 8 bytes. Otherwise the structure size will be
99  * different between 32-bit and 64-bit architectures.
100  */
101 
104  __u32 event_type; /* enum ib_event_type */
106 };
107 
110 };
111 
112 /*
113  * All commands from userspace should start with a __u32 command field
114  * followed by __u16 in_words and out_words fields (which give the
115  * length of the command block and response buffer if any in 32-bit
116  * words). The kernel driver will read these fields first and read
117  * the rest of the command struct based on these value.
118  */
119 
124 };
125 
129 };
130 
134 };
135 
139 };
140 
183 };
184 
190 };
191 
214 };
215 
219 };
220 
223 };
224 
227 };
228 
234 };
235 
238 };
239 
242 };
243 
252 };
253 
258 };
259 
262 };
263 
266 };
267 
270 };
271 
280 };
281 
285 };
286 
292 };
293 
298 };
299 
304 };
305 
306 struct ib_uverbs_wc {
312  union {
315  } ex;
325 };
326 
330  struct ib_uverbs_wc wc[0];
331 };
332 
336 };
337 
342 };
343 
347 };
348 
350  __u8 dgid[16];
356 };
357 
367 };
368 
380 
383 
384  /* ib_qp_cap */
390 
405 };
406 
424 };
425 
434 };
435 
436 /* also used for open response */
446 };
447 
448 /*
449  * This struct needs to remain a multiple of 8 bytes to keep the
450  * alignment of the modify QP parameters.
451  */
453  __u8 dgid[16];
465 };
466 
472 };
473 
506 };
507 
536 };
537 
539 };
540 
545 };
546 
549 };
550 
551 /*
552  * The ib_uverbs_sge structure isn't used anywhere, since we assume
553  * the ib_sge structure is packed the same way on 32-bit and 64-bit
554  * architectures in both kernel and user space. It's just here to
555  * document the ABI.
556  */
561 };
562 
568  union {
571  } ex;
572  union {
573  struct {
577  } rdma;
578  struct {
582  __u32 rkey;
583  __u32 reserved;
584  } atomic;
585  struct {
589  __u32 reserved;
590  } ud;
591  } wr;
592 };
593 
601 };
602 
605 };
606 
611 };
612 
620 };
621 
624 };
625 
633 };
634 
637 };
638 
645 };
646 
649 };
650 
653 };
654 
656  __u8 gid[16];
661 };
662 
664  __u8 gid[16];
669 };
670 
679 };
680 
693 };
694 
700 };
701 
708 };
709 
715 };
716 
722 };
723 
728 };
729 
732 };
733 
734 #endif /* IB_USER_VERBS_H */