1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef IB_USER_MAD_H
20 #define IB_USER_MAD_H
21 #include <linux/types.h>
22 #include <linux/ioctl.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define IB_USER_MAD_ABI_VERSION 5
25 struct ib_user_mad_hdr_old {
26   __u32 id;
27   __u32 status;
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29   __u32 timeout_ms;
30   __u32 retries;
31   __u32 length;
32   __be32 qpn;
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34   __be32 qkey;
35   __be16 lid;
36   __u8 sl;
37   __u8 path_bits;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   __u8 grh_present;
40   __u8 gid_index;
41   __u8 hop_limit;
42   __u8 traffic_class;
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44   __u8 gid[16];
45   __be32 flow_label;
46 };
47 struct ib_user_mad_hdr {
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49   __u32 id;
50   __u32 status;
51   __u32 timeout_ms;
52   __u32 retries;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54   __u32 length;
55   __be32 qpn;
56   __be32 qkey;
57   __be16 lid;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   __u8 sl;
60   __u8 path_bits;
61   __u8 grh_present;
62   __u8 gid_index;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   __u8 hop_limit;
65   __u8 traffic_class;
66   __u8 gid[16];
67   __be32 flow_label;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   __u16 pkey_index;
70   __u8 reserved[6];
71 };
72 struct ib_user_mad {
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   struct ib_user_mad_hdr hdr;
75   __u64 data[0];
76 };
77 typedef unsigned long __attribute__((aligned(4))) packed_ulong;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof(long)))
80 struct ib_user_mad_reg_req {
81   __u32 id;
82   packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   __u8 qpn;
85   __u8 mgmt_class;
86   __u8 mgmt_class_version;
87   __u8 oui[3];
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   __u8 rmpp_version;
90 };
91 enum {
92   IB_USER_MAD_USER_RMPP = (1 << 0),
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 };
95 #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
96 struct ib_user_mad_reg_req2 {
97   __u32 id;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   __u32 qpn;
100   __u8 mgmt_class;
101   __u8 mgmt_class_version;
102   __u16 res;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   __u32 flags;
105   __u64 method_mask[2];
106   __u32 oui;
107   __u8 rmpp_version;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   __u8 reserved[3];
110 };
111 #define IB_IOCTL_MAGIC 0x1b
112 #define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, struct ib_user_mad_reg_req)
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 #define IB_USER_MAD_UNREGISTER_AGENT _IOW(IB_IOCTL_MAGIC, 2, __u32)
115 #define IB_USER_MAD_ENABLE_PKEY _IO(IB_IOCTL_MAGIC, 3)
116 #define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, struct ib_user_mad_reg_req2)
117 #endif
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119