blob: cd723bb6140c5f8ad9c3de3fbcb2e4e1fd2c8dd6 [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>
Christopher Ferris525ce912017-07-26 13:12:53 -070022#include <rdma/rdma_user_ioctl.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define IB_USER_MAD_ABI_VERSION 5
24struct ib_user_mad_hdr_old {
Tao Baod7db5942015-01-28 10:07:51 -080025 __u32 id;
26 __u32 status;
Tao Baod7db5942015-01-28 10:07:51 -080027 __u32 timeout_ms;
28 __u32 retries;
29 __u32 length;
30 __be32 qpn;
Tao Baod7db5942015-01-28 10:07:51 -080031 __be32 qkey;
32 __be16 lid;
33 __u8 sl;
34 __u8 path_bits;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 grh_present;
36 __u8 gid_index;
37 __u8 hop_limit;
38 __u8 traffic_class;
Tao Baod7db5942015-01-28 10:07:51 -080039 __u8 gid[16];
40 __be32 flow_label;
Ben Cheng655a7c02013-10-16 16:09:24 -070041};
42struct ib_user_mad_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 id;
44 __u32 status;
45 __u32 timeout_ms;
46 __u32 retries;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u32 length;
48 __be32 qpn;
49 __be32 qkey;
50 __be16 lid;
Tao Baod7db5942015-01-28 10:07:51 -080051 __u8 sl;
52 __u8 path_bits;
53 __u8 grh_present;
54 __u8 gid_index;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u8 hop_limit;
56 __u8 traffic_class;
57 __u8 gid[16];
58 __be32 flow_label;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u16 pkey_index;
60 __u8 reserved[6];
Ben Cheng655a7c02013-10-16 16:09:24 -070061};
62struct ib_user_mad {
Tao Baod7db5942015-01-28 10:07:51 -080063 struct ib_user_mad_hdr hdr;
64 __u64 data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -070065};
66typedef unsigned long __attribute__((aligned(4))) packed_ulong;
Tao Baod7db5942015-01-28 10:07:51 -080067#define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof(long)))
Ben Cheng655a7c02013-10-16 16:09:24 -070068struct ib_user_mad_reg_req {
Tao Baod7db5942015-01-28 10:07:51 -080069 __u32 id;
70 packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK];
Tao Baod7db5942015-01-28 10:07:51 -080071 __u8 qpn;
72 __u8 mgmt_class;
73 __u8 mgmt_class_version;
74 __u8 oui[3];
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 rmpp_version;
Ben Cheng655a7c02013-10-16 16:09:24 -070076};
Christopher Ferris82d75042015-01-26 10:57:07 -080077enum {
Tao Baod7db5942015-01-28 10:07:51 -080078 IB_USER_MAD_USER_RMPP = (1 << 0),
Christopher Ferris82d75042015-01-26 10:57:07 -080079};
80#define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP)
81struct ib_user_mad_reg_req2 {
Tao Baod7db5942015-01-28 10:07:51 -080082 __u32 id;
Tao Baod7db5942015-01-28 10:07:51 -080083 __u32 qpn;
84 __u8 mgmt_class;
85 __u8 mgmt_class_version;
86 __u16 res;
Tao Baod7db5942015-01-28 10:07:51 -080087 __u32 flags;
88 __u64 method_mask[2];
89 __u32 oui;
90 __u8 rmpp_version;
Tao Baod7db5942015-01-28 10:07:51 -080091 __u8 reserved[3];
Christopher Ferris82d75042015-01-26 10:57:07 -080092};
Ben Cheng655a7c02013-10-16 16:09:24 -070093#endif