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