• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef IB_USER_MAD_H
7 #define IB_USER_MAD_H
8 #include <linux/types.h>
9 #include <rdma/rdma_user_ioctl.h>
10 #define IB_USER_MAD_ABI_VERSION	5
11 struct ib_user_mad_hdr_old {
12 	__u32	id;
13 	__u32	status;
14 	__u32	timeout_ms;
15 	__u32	retries;
16 	__u32	length;
17 	__be32	qpn;
18 	__be32  qkey;
19 	__be16	lid;
20 	__u8	sl;
21 	__u8	path_bits;
22 	__u8	grh_present;
23 	__u8	gid_index;
24 	__u8	hop_limit;
25 	__u8	traffic_class;
26 	__u8	gid[16];
27 	__be32	flow_label;
28 };
29 struct ib_user_mad_hdr {
30 	__u32	id;
31 	__u32	status;
32 	__u32	timeout_ms;
33 	__u32	retries;
34 	__u32	length;
35 	__be32	qpn;
36 	__be32  qkey;
37 	__be16	lid;
38 	__u8	sl;
39 	__u8	path_bits;
40 	__u8	grh_present;
41 	__u8	gid_index;
42 	__u8	hop_limit;
43 	__u8	traffic_class;
44 	__u8	gid[16];
45 	__be32	flow_label;
46 	__u16	pkey_index;
47 	__u8	reserved[6];
48 };
49 struct ib_user_mad {
50 	struct ib_user_mad_hdr hdr;
51 	__aligned_u64	data[0];
52 };
53 typedef unsigned long __attribute__((aligned(4))) packed_ulong;
54 #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof (long)))
55 struct ib_user_mad_reg_req {
56 	__u32	id;
57 	packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
58 	__u8	qpn;
59 	__u8	mgmt_class;
60 	__u8	mgmt_class_version;
61 	__u8    oui[3];
62 	__u8	rmpp_version;
63 };
64 enum {
65 	IB_USER_MAD_USER_RMPP = (1 << 0),
66 };
67 #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
68 struct ib_user_mad_reg_req2 {
69 	__u32	id;
70 	__u32	qpn;
71 	__u8	mgmt_class;
72 	__u8	mgmt_class_version;
73 	__u16   res;
74 	__u32   flags;
75 	__aligned_u64 method_mask[2];
76 	__u32   oui;
77 	__u8	rmpp_version;
78 	__u8	reserved[3];
79 };
80 #endif
81