blob: 3117888b1c5d05066997726c6d84331bc225ade2 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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
25struct ib_user_mad_hdr_old {
Tao Baod7db5942015-01-28 10:07:51 -080026 __u32 id;
27 __u32 status;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __u32 timeout_ms;
30 __u32 retries;
31 __u32 length;
32 __be32 qpn;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 __be32 qkey;
35 __be16 lid;
36 __u8 sl;
37 __u8 path_bits;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 __u8 grh_present;
40 __u8 gid_index;
41 __u8 hop_limit;
42 __u8 traffic_class;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u8 gid[16];
45 __be32 flow_label;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47struct ib_user_mad_hdr {
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 __u32 id;
50 __u32 status;
51 __u32 timeout_ms;
52 __u32 retries;
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 length;
55 __be32 qpn;
56 __be32 qkey;
57 __be16 lid;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 __u8 sl;
60 __u8 path_bits;
61 __u8 grh_present;
62 __u8 gid_index;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __u8 hop_limit;
65 __u8 traffic_class;
66 __u8 gid[16];
67 __be32 flow_label;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 __u16 pkey_index;
70 __u8 reserved[6];
Ben Cheng655a7c02013-10-16 16:09:24 -070071};
72struct ib_user_mad {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 struct ib_user_mad_hdr hdr;
75 __u64 data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -070076};
77typedef unsigned long __attribute__((aligned(4))) packed_ulong;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof(long)))
Ben Cheng655a7c02013-10-16 16:09:24 -070080struct ib_user_mad_reg_req {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u32 id;
82 packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __u8 qpn;
85 __u8 mgmt_class;
86 __u8 mgmt_class_version;
87 __u8 oui[3];
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 __u8 rmpp_version;
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
Christopher Ferris82d75042015-01-26 10:57:07 -080091enum {
Tao Baod7db5942015-01-28 10:07:51 -080092 IB_USER_MAD_USER_RMPP = (1 << 0),
Christopher Ferris82d75042015-01-26 10:57:07 -080093/* 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)
96struct ib_user_mad_reg_req2 {
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 id;
Christopher Ferris82d75042015-01-26 10:57:07 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 __u32 qpn;
100 __u8 mgmt_class;
101 __u8 mgmt_class_version;
102 __u16 res;
Christopher Ferris82d75042015-01-26 10:57:07 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 __u32 flags;
105 __u64 method_mask[2];
106 __u32 oui;
107 __u8 rmpp_version;
Christopher Ferris82d75042015-01-26 10:57:07 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u8 reserved[3];
Christopher Ferris82d75042015-01-26 10:57:07 -0800110};
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define IB_IOCTL_MAGIC 0x1b
Tao Baod7db5942015-01-28 10:07:51 -0800112#define IB_USER_MAD_REGISTER_AGENT _IOWR(IB_IOCTL_MAGIC, 1, struct ib_user_mad_reg_req)
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* 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)
Tao Baod7db5942015-01-28 10:07:51 -0800116#define IB_USER_MAD_REGISTER_AGENT2 _IOWR(IB_IOCTL_MAGIC, 4, struct ib_user_mad_reg_req2)
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#endif
Christopher Ferris82d75042015-01-26 10:57:07 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */