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 RDMA_USER_RXE_H 7 #define RDMA_USER_RXE_H 8 #include <linux/types.h> 9 #include <linux/socket.h> 10 #include <linux/in.h> 11 #include <linux/in6.h> 12 union rxe_gid { 13 __u8 raw[16]; 14 struct { 15 __be64 subnet_prefix; 16 __be64 interface_id; 17 } global; 18 }; 19 struct rxe_global_route { 20 union rxe_gid dgid; 21 __u32 flow_label; 22 __u8 sgid_index; 23 __u8 hop_limit; 24 __u8 traffic_class; 25 }; 26 struct rxe_av { 27 __u8 port_num; 28 __u8 network_type; 29 __u16 reserved1; 30 __u32 reserved2; 31 struct rxe_global_route grh; 32 union { 33 struct sockaddr_in _sockaddr_in; 34 struct sockaddr_in6 _sockaddr_in6; 35 } sgid_addr, dgid_addr; 36 }; 37 struct rxe_send_wr { 38 __aligned_u64 wr_id; 39 __u32 num_sge; 40 __u32 opcode; 41 __u32 send_flags; 42 union { 43 __be32 imm_data; 44 __u32 invalidate_rkey; 45 } ex; 46 union { 47 struct { 48 __aligned_u64 remote_addr; 49 __u32 rkey; 50 __u32 reserved; 51 } rdma; 52 struct { 53 __aligned_u64 remote_addr; 54 __aligned_u64 compare_add; 55 __aligned_u64 swap; 56 __u32 rkey; 57 __u32 reserved; 58 } atomic; 59 struct { 60 __u32 remote_qpn; 61 __u32 remote_qkey; 62 __u16 pkey_index; 63 } ud; 64 65 struct { 66 union { 67 struct ib_mr *mr; 68 __aligned_u64 reserved; 69 }; 70 __u32 key; 71 __u32 access; 72 } reg; 73 } wr; 74 }; 75 struct rxe_sge { 76 __aligned_u64 addr; 77 __u32 length; 78 __u32 lkey; 79 }; 80 struct mminfo { 81 __aligned_u64 offset; 82 __u32 size; 83 __u32 pad; 84 }; 85 struct rxe_dma_info { 86 __u32 length; 87 __u32 resid; 88 __u32 cur_sge; 89 __u32 num_sge; 90 __u32 sge_offset; 91 __u32 reserved; 92 union { 93 __u8 inline_data[0]; 94 struct rxe_sge sge[0]; 95 }; 96 }; 97 struct rxe_send_wqe { 98 struct rxe_send_wr wr; 99 struct rxe_av av; 100 __u32 status; 101 __u32 state; 102 __aligned_u64 iova; 103 __u32 mask; 104 __u32 first_psn; 105 __u32 last_psn; 106 __u32 ack_length; 107 __u32 ssn; 108 __u32 has_rd_atomic; 109 struct rxe_dma_info dma; 110 }; 111 struct rxe_recv_wqe { 112 __aligned_u64 wr_id; 113 __u32 num_sge; 114 __u32 padding; 115 struct rxe_dma_info dma; 116 }; 117 struct rxe_create_cq_resp { 118 struct mminfo mi; 119 }; 120 struct rxe_resize_cq_resp { 121 struct mminfo mi; 122 }; 123 struct rxe_create_qp_resp { 124 struct mminfo rq_mi; 125 struct mminfo sq_mi; 126 }; 127 struct rxe_create_srq_resp { 128 struct mminfo mi; 129 __u32 srq_num; 130 __u32 reserved; 131 }; 132 struct rxe_modify_srq_cmd { 133 __aligned_u64 mmap_info_addr; 134 }; 135 #endif 136