1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef IB_USER_MAD_H 8 #define IB_USER_MAD_H 9 #include <linux/types.h> 10 #include <rdma/rdma_user_ioctl.h> 11 #define IB_USER_MAD_ABI_VERSION 5 12 struct ib_user_mad_hdr_old { 13 __u32 id; 14 __u32 status; 15 __u32 timeout_ms; 16 __u32 retries; 17 __u32 length; 18 __be32 qpn; 19 __be32 qkey; 20 __be16 lid; 21 __u8 sl; 22 __u8 path_bits; 23 __u8 grh_present; 24 __u8 gid_index; 25 __u8 hop_limit; 26 __u8 traffic_class; 27 __u8 gid[16]; 28 __be32 flow_label; 29 }; 30 struct ib_user_mad_hdr { 31 __u32 id; 32 __u32 status; 33 __u32 timeout_ms; 34 __u32 retries; 35 __u32 length; 36 __be32 qpn; 37 __be32 qkey; 38 __be16 lid; 39 __u8 sl; 40 __u8 path_bits; 41 __u8 grh_present; 42 __u8 gid_index; 43 __u8 hop_limit; 44 __u8 traffic_class; 45 __u8 gid[16]; 46 __be32 flow_label; 47 __u16 pkey_index; 48 __u8 reserved[6]; 49 }; 50 struct ib_user_mad { 51 struct ib_user_mad_hdr hdr; 52 __aligned_u64 data[]; 53 }; 54 typedef unsigned long __attribute__((aligned(4))) packed_ulong; 55 #define IB_USER_MAD_LONGS_PER_METHOD_MASK (128 / (8 * sizeof(long))) 56 struct ib_user_mad_reg_req { 57 __u32 id; 58 packed_ulong method_mask[IB_USER_MAD_LONGS_PER_METHOD_MASK]; 59 __u8 qpn; 60 __u8 mgmt_class; 61 __u8 mgmt_class_version; 62 __u8 oui[3]; 63 __u8 rmpp_version; 64 }; 65 enum { 66 IB_USER_MAD_USER_RMPP = (1 << 0), 67 }; 68 #define IB_USER_MAD_REG_FLAGS_CAP (IB_USER_MAD_USER_RMPP) 69 struct ib_user_mad_reg_req2 { 70 __u32 id; 71 __u32 qpn; 72 __u8 mgmt_class; 73 __u8 mgmt_class_version; 74 __u16 res; 75 __u32 flags; 76 __aligned_u64 method_mask[2]; 77 __u32 oui; 78 __u8 rmpp_version; 79 __u8 reserved[3]; 80 }; 81 #endif 82