blob: e7619d8bd2e99db62f94c91ebfde749befc61f89 [file] [log] [blame]
Christopher Ferris49f525c2016-12-12 14:55:36 -08001/****************************************************************************
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 Ferris76a1d452018-06-27 14:12:29 -070022#include <linux/socket.h>
23#include <linux/in.h>
24#include <linux/in6.h>
Christopher Ferris32ff3f82020-12-14 13:10:04 -080025enum {
26 RXE_NETWORK_TYPE_IPV4 = 1,
27 RXE_NETWORK_TYPE_IPV6 = 2,
28};
Christopher Ferris49f525c2016-12-12 14:55:36 -080029union rxe_gid {
Christopher Ferris49f525c2016-12-12 14:55:36 -080030 __u8 raw[16];
31 struct {
32 __be64 subnet_prefix;
33 __be64 interface_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -080034 } global;
35};
36struct rxe_global_route {
37 union rxe_gid dgid;
Christopher Ferris49f525c2016-12-12 14:55:36 -080038 __u32 flow_label;
39 __u8 sgid_index;
40 __u8 hop_limit;
41 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -080042};
43struct rxe_av {
44 __u8 port_num;
45 __u8 network_type;
Christopher Ferris24f97eb2019-05-20 12:58:13 -070046 __u8 dmac[6];
Christopher Ferris49f525c2016-12-12 14:55:36 -080047 struct rxe_global_route grh;
48 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -080049 struct sockaddr_in _sockaddr_in;
Christopher Ferris49f525c2016-12-12 14:55:36 -080050 struct sockaddr_in6 _sockaddr_in6;
51 } sgid_addr, dgid_addr;
52};
53struct rxe_send_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -070054 __aligned_u64 wr_id;
Christopher Ferris6cd53a52022-12-12 23:39:16 +000055 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080056 __u32 opcode;
57 __u32 send_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -080058 union {
59 __be32 imm_data;
60 __u32 invalidate_rkey;
61 } ex;
Christopher Ferris49f525c2016-12-12 14:55:36 -080062 union {
63 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070064 __aligned_u64 remote_addr;
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080065 __u32 length;
66 __u32 rkey;
67 __u8 type;
68 __u8 level;
69 } flush;
70 struct {
71 __aligned_u64 remote_addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -080072 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070073 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080074 } rdma;
75 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070076 __aligned_u64 remote_addr;
77 __aligned_u64 compare_add;
78 __aligned_u64 swap;
Christopher Ferris49f525c2016-12-12 14:55:36 -080079 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070080 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080081 } atomic;
82 struct {
Christopher Ferris49f525c2016-12-12 14:55:36 -080083 __u32 remote_qpn;
84 __u32 remote_qkey;
85 __u16 pkey_index;
Christopher Ferrisa4792612022-01-10 13:51:15 -080086 __u16 reserved;
87 __u32 ah_num;
88 __u32 pad[4];
89 struct rxe_av av;
Christopher Ferris49f525c2016-12-12 14:55:36 -080090 } ud;
Christopher Ferris49f525c2016-12-12 14:55:36 -080091 struct {
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000092 __aligned_u64 addr;
93 __aligned_u64 length;
94 __u32 mr_lkey;
95 __u32 mw_rkey;
96 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070097 __u32 access;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000098 } mw;
Christopher Ferris49f525c2016-12-12 14:55:36 -080099 } wr;
100};
101struct rxe_sge {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700102 __aligned_u64 addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103 __u32 length;
104 __u32 lkey;
105};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800106struct mminfo {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700107 __aligned_u64 offset;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108 __u32 size;
109 __u32 pad;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800110};
111struct rxe_dma_info {
112 __u32 length;
113 __u32 resid;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800114 __u32 cur_sge;
115 __u32 num_sge;
116 __u32 sge_offset;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700117 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800118 union {
Christopher Ferrisa4792612022-01-10 13:51:15 -0800119 __DECLARE_FLEX_ARRAY(__u8, inline_data);
Christopher Ferris8b7fdc92023-02-21 13:36:32 -0800120 __DECLARE_FLEX_ARRAY(__u8, atomic_wr);
Christopher Ferrisa4792612022-01-10 13:51:15 -0800121 __DECLARE_FLEX_ARRAY(struct rxe_sge, sge);
Christopher Ferris49f525c2016-12-12 14:55:36 -0800122 };
123};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800124struct rxe_send_wqe {
125 struct rxe_send_wr wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800126 __u32 status;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800127 __u32 state;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700128 __aligned_u64 iova;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800129 __u32 mask;
130 __u32 first_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800131 __u32 last_psn;
132 __u32 ack_length;
133 __u32 ssn;
134 __u32 has_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800135 struct rxe_dma_info dma;
136};
137struct rxe_recv_wqe {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700138 __aligned_u64 wr_id;
Christopher Ferris6cd53a52022-12-12 23:39:16 +0000139 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800140 __u32 padding;
141 struct rxe_dma_info dma;
142};
Christopher Ferrisa4792612022-01-10 13:51:15 -0800143struct rxe_create_ah_resp {
144 __u32 ah_num;
145 __u32 reserved;
146};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700147struct rxe_create_cq_resp {
148 struct mminfo mi;
149};
150struct rxe_resize_cq_resp {
151 struct mminfo mi;
152};
153struct rxe_create_qp_resp {
154 struct mminfo rq_mi;
155 struct mminfo sq_mi;
156};
157struct rxe_create_srq_resp {
158 struct mminfo mi;
159 __u32 srq_num;
160 __u32 reserved;
161};
162struct rxe_modify_srq_cmd {
163 __aligned_u64 mmap_info_addr;
164};
Christopher Ferris05667cd2021-02-16 16:01:34 -0800165struct rxe_queue_buf {
166 __u32 log2_elem_size;
167 __u32 index_mask;
168 __u32 pad_1[30];
169 __u32 producer_index;
170 __u32 pad_2[31];
171 __u32 consumer_index;
172 __u32 pad_3[31];
173 __u8 data[];
174};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800175#endif