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> |
| 22 | union rxe_gid { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 23 | __u8 raw[16]; |
| 24 | struct { |
| 25 | __be64 subnet_prefix; |
| 26 | __be64 interface_id; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 27 | } global; |
| 28 | }; |
| 29 | struct rxe_global_route { |
| 30 | union rxe_gid dgid; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 31 | __u32 flow_label; |
| 32 | __u8 sgid_index; |
| 33 | __u8 hop_limit; |
| 34 | __u8 traffic_class; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 35 | }; |
| 36 | struct rxe_av { |
| 37 | __u8 port_num; |
| 38 | __u8 network_type; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 39 | struct rxe_global_route grh; |
| 40 | union { |
| 41 | struct sockaddr _sockaddr; |
| 42 | struct sockaddr_in _sockaddr_in; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 43 | struct sockaddr_in6 _sockaddr_in6; |
| 44 | } sgid_addr, dgid_addr; |
| 45 | }; |
| 46 | struct rxe_send_wr { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 47 | __u64 wr_id; |
| 48 | __u32 num_sge; |
| 49 | __u32 opcode; |
| 50 | __u32 send_flags; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 51 | union { |
| 52 | __be32 imm_data; |
| 53 | __u32 invalidate_rkey; |
| 54 | } ex; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 55 | union { |
| 56 | struct { |
| 57 | __u64 remote_addr; |
| 58 | __u32 rkey; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 59 | } rdma; |
| 60 | struct { |
| 61 | __u64 remote_addr; |
| 62 | __u64 compare_add; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 63 | __u64 swap; |
| 64 | __u32 rkey; |
| 65 | } atomic; |
| 66 | struct { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 67 | __u32 remote_qpn; |
| 68 | __u32 remote_qkey; |
| 69 | __u16 pkey_index; |
| 70 | } ud; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 71 | struct { |
| 72 | struct ib_mr * mr; |
| 73 | __u32 key; |
| 74 | int access; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 75 | } reg; |
| 76 | } wr; |
| 77 | }; |
| 78 | struct rxe_sge { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 79 | __u64 addr; |
| 80 | __u32 length; |
| 81 | __u32 lkey; |
| 82 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 83 | struct mminfo { |
| 84 | __u64 offset; |
| 85 | __u32 size; |
| 86 | __u32 pad; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 87 | }; |
| 88 | struct rxe_dma_info { |
| 89 | __u32 length; |
| 90 | __u32 resid; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 91 | __u32 cur_sge; |
| 92 | __u32 num_sge; |
| 93 | __u32 sge_offset; |
| 94 | union { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 95 | __u8 inline_data[0]; |
| 96 | struct rxe_sge sge[0]; |
| 97 | }; |
| 98 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 99 | struct rxe_send_wqe { |
| 100 | struct rxe_send_wr wr; |
| 101 | struct rxe_av av; |
| 102 | __u32 status; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 103 | __u32 state; |
| 104 | __u64 iova; |
| 105 | __u32 mask; |
| 106 | __u32 first_psn; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 107 | __u32 last_psn; |
| 108 | __u32 ack_length; |
| 109 | __u32 ssn; |
| 110 | __u32 has_rd_atomic; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 111 | struct rxe_dma_info dma; |
| 112 | }; |
| 113 | struct rxe_recv_wqe { |
| 114 | __u64 wr_id; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 115 | __u32 num_sge; |
| 116 | __u32 padding; |
| 117 | struct rxe_dma_info dma; |
| 118 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 119 | #endif |