blob: 57b6467cff095a7a01b279bdbc8adaa14f340418 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 */
Christopher Ferris49f525c2016-12-12 14:55:36 -08007#ifndef RDMA_USER_RXE_H
8#define RDMA_USER_RXE_H
9#include <linux/types.h>
Christopher Ferris76a1d452018-06-27 14:12:29 -070010#include <linux/socket.h>
11#include <linux/in.h>
12#include <linux/in6.h>
Christopher Ferris32ff3f82020-12-14 13:10:04 -080013enum {
14 RXE_NETWORK_TYPE_IPV4 = 1,
15 RXE_NETWORK_TYPE_IPV6 = 2,
16};
Christopher Ferris49f525c2016-12-12 14:55:36 -080017union rxe_gid {
Christopher Ferris49f525c2016-12-12 14:55:36 -080018 __u8 raw[16];
19 struct {
20 __be64 subnet_prefix;
21 __be64 interface_id;
Christopher Ferris49f525c2016-12-12 14:55:36 -080022 } global;
23};
24struct rxe_global_route {
25 union rxe_gid dgid;
Christopher Ferris49f525c2016-12-12 14:55:36 -080026 __u32 flow_label;
27 __u8 sgid_index;
28 __u8 hop_limit;
29 __u8 traffic_class;
Christopher Ferris49f525c2016-12-12 14:55:36 -080030};
31struct rxe_av {
32 __u8 port_num;
33 __u8 network_type;
Christopher Ferris24f97eb2019-05-20 12:58:13 -070034 __u8 dmac[6];
Christopher Ferris49f525c2016-12-12 14:55:36 -080035 struct rxe_global_route grh;
36 union {
Christopher Ferris49f525c2016-12-12 14:55:36 -080037 struct sockaddr_in _sockaddr_in;
Christopher Ferris49f525c2016-12-12 14:55:36 -080038 struct sockaddr_in6 _sockaddr_in6;
39 } sgid_addr, dgid_addr;
40};
41struct rxe_send_wr {
Christopher Ferris76a1d452018-06-27 14:12:29 -070042 __aligned_u64 wr_id;
Christopher Ferris6cd53a52022-12-12 23:39:16 +000043 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080044 __u32 opcode;
45 __u32 send_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -080046 union {
47 __be32 imm_data;
48 __u32 invalidate_rkey;
49 } ex;
Christopher Ferris49f525c2016-12-12 14:55:36 -080050 union {
51 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070052 __aligned_u64 remote_addr;
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080053 __u32 length;
54 __u32 rkey;
55 __u8 type;
56 __u8 level;
57 } flush;
58 struct {
59 __aligned_u64 remote_addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -080060 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070061 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080062 } rdma;
63 struct {
Christopher Ferris76a1d452018-06-27 14:12:29 -070064 __aligned_u64 remote_addr;
65 __aligned_u64 compare_add;
66 __aligned_u64 swap;
Christopher Ferris49f525c2016-12-12 14:55:36 -080067 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070068 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -080069 } atomic;
70 struct {
Christopher Ferris49f525c2016-12-12 14:55:36 -080071 __u32 remote_qpn;
72 __u32 remote_qkey;
73 __u16 pkey_index;
Christopher Ferrisa4792612022-01-10 13:51:15 -080074 __u16 reserved;
75 __u32 ah_num;
76 __u32 pad[4];
77 struct rxe_av av;
Christopher Ferris49f525c2016-12-12 14:55:36 -080078 } ud;
Christopher Ferris49f525c2016-12-12 14:55:36 -080079 struct {
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000080 __aligned_u64 addr;
81 __aligned_u64 length;
82 __u32 mr_lkey;
83 __u32 mw_rkey;
84 __u32 rkey;
Christopher Ferris76a1d452018-06-27 14:12:29 -070085 __u32 access;
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000086 } mw;
Christopher Ferris49f525c2016-12-12 14:55:36 -080087 } wr;
88};
89struct rxe_sge {
Christopher Ferris76a1d452018-06-27 14:12:29 -070090 __aligned_u64 addr;
Christopher Ferris49f525c2016-12-12 14:55:36 -080091 __u32 length;
92 __u32 lkey;
93};
Christopher Ferris49f525c2016-12-12 14:55:36 -080094struct mminfo {
Christopher Ferris76a1d452018-06-27 14:12:29 -070095 __aligned_u64 offset;
Christopher Ferris49f525c2016-12-12 14:55:36 -080096 __u32 size;
97 __u32 pad;
Christopher Ferris49f525c2016-12-12 14:55:36 -080098};
99struct rxe_dma_info {
100 __u32 length;
101 __u32 resid;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800102 __u32 cur_sge;
103 __u32 num_sge;
104 __u32 sge_offset;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700105 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800106 union {
Christopher Ferrisa4792612022-01-10 13:51:15 -0800107 __DECLARE_FLEX_ARRAY(__u8, inline_data);
Christopher Ferris8b7fdc92023-02-21 13:36:32 -0800108 __DECLARE_FLEX_ARRAY(__u8, atomic_wr);
Christopher Ferrisa4792612022-01-10 13:51:15 -0800109 __DECLARE_FLEX_ARRAY(struct rxe_sge, sge);
Christopher Ferris49f525c2016-12-12 14:55:36 -0800110 };
111};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800112struct rxe_send_wqe {
113 struct rxe_send_wr wr;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800114 __u32 status;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800115 __u32 state;
Christopher Ferris76a1d452018-06-27 14:12:29 -0700116 __aligned_u64 iova;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800117 __u32 mask;
118 __u32 first_psn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800119 __u32 last_psn;
120 __u32 ack_length;
121 __u32 ssn;
122 __u32 has_rd_atomic;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800123 struct rxe_dma_info dma;
124};
125struct rxe_recv_wqe {
Christopher Ferris76a1d452018-06-27 14:12:29 -0700126 __aligned_u64 wr_id;
Christopher Ferris6cd53a52022-12-12 23:39:16 +0000127 __u32 reserved;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128 __u32 padding;
129 struct rxe_dma_info dma;
130};
Christopher Ferrisa4792612022-01-10 13:51:15 -0800131struct rxe_create_ah_resp {
132 __u32 ah_num;
133 __u32 reserved;
134};
Christopher Ferris76a1d452018-06-27 14:12:29 -0700135struct rxe_create_cq_resp {
136 struct mminfo mi;
137};
138struct rxe_resize_cq_resp {
139 struct mminfo mi;
140};
141struct rxe_create_qp_resp {
142 struct mminfo rq_mi;
143 struct mminfo sq_mi;
144};
145struct rxe_create_srq_resp {
146 struct mminfo mi;
147 __u32 srq_num;
148 __u32 reserved;
149};
150struct rxe_modify_srq_cmd {
151 __aligned_u64 mmap_info_addr;
152};
Christopher Ferris05667cd2021-02-16 16:01:34 -0800153struct rxe_queue_buf {
154 __u32 log2_elem_size;
155 __u32 index_mask;
156 __u32 pad_1[30];
157 __u32 producer_index;
158 __u32 pad_2[31];
159 __u32 consumer_index;
160 __u32 pad_3[31];
161 __u8 data[];
162};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800163#endif