• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <rdma/rdma_user_ioctl.h>
23 #define IB_USER_MAD_ABI_VERSION 5
24 struct ib_user_mad_hdr_old {
25   __u32 id;
26   __u32 status;
27   __u32 timeout_ms;
28   __u32 retries;
29   __u32 length;
30   __be32 qpn;
31   __be32 qkey;
32   __be16 lid;
33   __u8 sl;
34   __u8 path_bits;
35   __u8 grh_present;
36   __u8 gid_index;
37   __u8 hop_limit;
38   __u8 traffic_class;
39   __u8 gid[16];
40   __be32 flow_label;
41 };
42 struct ib_user_mad_hdr {
43   __u32 id;
44   __u32 status;
45   __u32 timeout_ms;
46   __u32 retries;
47   __u32 length;
48   __be32 qpn;
49   __be32 qkey;
50   __be16 lid;
51   __u8 sl;
52   __u8 path_bits;
53   __u8 grh_present;
54   __u8 gid_index;
55   __u8 hop_limit;
56   __u8 traffic_class;
57   __u8 gid[16];
58   __be32 flow_label;
59   __u16 pkey_index;
60   __u8 reserved[6];
61 };
62 struct ib_user_mad {
63   struct ib_user_mad_hdr hdr;
64   __aligned_u64 data[];
65 };
66 typedef unsigned long __attribute__((aligned(4))) packed_ulong;
67 #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof(long)))
68 struct ib_user_mad_reg_req {
69   __u32 id;
70   packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
71   __u8 qpn;
72   __u8 mgmt_class;
73   __u8 mgmt_class_version;
74   __u8 oui[3];
75   __u8 rmpp_version;
76 };
77 enum {
78   IB_USER_MAD_USER_RMPP = (1 << 0),
79 };
80 #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
81 struct ib_user_mad_reg_req2 {
82   __u32 id;
83   __u32 qpn;
84   __u8 mgmt_class;
85   __u8 mgmt_class_version;
86   __u16 res;
87   __u32 flags;
88   __aligned_u64 method_mask[2];
89   __u32 oui;
90   __u8 rmpp_version;
91   __u8 reserved[3];
92 };
93 #endif
94