• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 _LINUX_RDS_H
20 #define _LINUX_RDS_H
21 #include <linux/types.h>
22 #define RDS_IB_ABI_VERSION 0x301
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define RDS_CANCEL_SENT_TO 1
25 #define RDS_GET_MR 2
26 #define RDS_FREE_MR 3
27 #define RDS_RECVERR 5
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define RDS_CONG_MONITOR 6
30 #define RDS_GET_MR_FOR_DEST 7
31 #define RDS_CMSG_RDMA_ARGS 1
32 #define RDS_CMSG_RDMA_DEST 2
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define RDS_CMSG_RDMA_MAP 3
35 #define RDS_CMSG_RDMA_STATUS 4
36 #define RDS_CMSG_CONG_UPDATE 5
37 #define RDS_CMSG_ATOMIC_FADD 6
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define RDS_CMSG_ATOMIC_CSWP 7
40 #define RDS_CMSG_MASKED_ATOMIC_FADD 8
41 #define RDS_CMSG_MASKED_ATOMIC_CSWP 9
42 #define RDS_INFO_FIRST 10000
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define RDS_INFO_COUNTERS 10000
45 #define RDS_INFO_CONNECTIONS 10001
46 #define RDS_INFO_SEND_MESSAGES 10003
47 #define RDS_INFO_RETRANS_MESSAGES 10004
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define RDS_INFO_RECV_MESSAGES 10005
50 #define RDS_INFO_SOCKETS 10006
51 #define RDS_INFO_TCP_SOCKETS 10007
52 #define RDS_INFO_IB_CONNECTIONS 10008
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define RDS_INFO_CONNECTION_STATS 10009
55 #define RDS_INFO_IWARP_CONNECTIONS 10010
56 #define RDS_INFO_LAST 10010
57 struct rds_info_counter {
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  uint8_t name[32];
60  uint64_t value;
61 } __attribute__((packed));
62 #define RDS_INFO_CONNECTION_FLAG_SENDING 0x01
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02
65 #define RDS_INFO_CONNECTION_FLAG_CONNECTED 0x04
66 #define TRANSNAMSIZ 16
67 struct rds_info_connection {
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  uint64_t next_tx_seq;
70  uint64_t next_rx_seq;
71  __be32 laddr;
72  __be32 faddr;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  uint8_t transport[TRANSNAMSIZ];
75  uint8_t flags;
76 } __attribute__((packed));
77 #define RDS_INFO_MESSAGE_FLAG_ACK 0x01
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 #define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02
80 struct rds_info_message {
81  uint64_t seq;
82  uint32_t len;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  __be32 laddr;
85  __be32 faddr;
86  __be16 lport;
87  __be16 fport;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  uint8_t flags;
90 } __attribute__((packed));
91 struct rds_info_socket {
92  uint32_t sndbuf;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  __be32 bound_addr;
95  __be32 connected_addr;
96  __be16 bound_port;
97  __be16 connected_port;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  uint32_t rcvbuf;
100  uint64_t inum;
101 } __attribute__((packed));
102 struct rds_info_tcp_socket {
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  __be32 local_addr;
105  __be16 local_port;
106  __be32 peer_addr;
107  __be16 peer_port;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  uint64_t hdr_rem;
110  uint64_t data_rem;
111  uint32_t last_sent_nxt;
112  uint32_t last_expected_una;
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  uint32_t last_seen_una;
115 } __attribute__((packed));
116 #define RDS_IB_GID_LEN 16
117 struct rds_info_rdma_connection {
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  __be32 src_addr;
120  __be32 dst_addr;
121  uint8_t src_gid[RDS_IB_GID_LEN];
122  uint8_t dst_gid[RDS_IB_GID_LEN];
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  uint32_t max_send_wr;
125  uint32_t max_recv_wr;
126  uint32_t max_send_sge;
127  uint32_t rdma_mr_max;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  uint32_t rdma_mr_size;
130 };
131 #define RDS_CONG_MONITOR_SIZE 64
132 #define RDS_CONG_MONITOR_BIT(port) (((unsigned int) port) % RDS_CONG_MONITOR_SIZE)
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define RDS_CONG_MONITOR_MASK(port) (1ULL << RDS_CONG_MONITOR_BIT(port))
135 typedef uint64_t rds_rdma_cookie_t;
136 struct rds_iovec {
137  uint64_t addr;
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  uint64_t bytes;
140 };
141 struct rds_get_mr_args {
142  struct rds_iovec vec;
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  uint64_t cookie_addr;
145  uint64_t flags;
146 };
147 struct rds_get_mr_for_dest_args {
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  struct sockaddr_storage dest_addr;
150  struct rds_iovec vec;
151  uint64_t cookie_addr;
152  uint64_t flags;
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 };
155 struct rds_free_mr_args {
156  rds_rdma_cookie_t cookie;
157  uint64_t flags;
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 };
160 struct rds_rdma_args {
161  rds_rdma_cookie_t cookie;
162  struct rds_iovec remote_vec;
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  uint64_t local_vec_addr;
165  uint64_t nr_local;
166  uint64_t flags;
167  uint64_t user_token;
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 };
170 struct rds_atomic_args {
171  rds_rdma_cookie_t cookie;
172  uint64_t local_addr;
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  uint64_t remote_addr;
175  union {
176  struct {
177  uint64_t compare;
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  uint64_t swap;
180  } cswp;
181  struct {
182  uint64_t add;
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  } fadd;
185  struct {
186  uint64_t compare;
187  uint64_t swap;
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  uint64_t compare_mask;
190  uint64_t swap_mask;
191  } m_cswp;
192  struct {
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  uint64_t add;
195  uint64_t nocarry_mask;
196  } m_fadd;
197  };
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  uint64_t flags;
200  uint64_t user_token;
201 };
202 struct rds_rdma_notify {
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204  uint64_t user_token;
205  int32_t status;
206 };
207 #define RDS_RDMA_SUCCESS 0
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 #define RDS_RDMA_REMOTE_ERROR 1
210 #define RDS_RDMA_CANCELED 2
211 #define RDS_RDMA_DROPPED 3
212 #define RDS_RDMA_OTHER_ERROR 4
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 #define RDS_RDMA_READWRITE 0x0001
215 #define RDS_RDMA_FENCE 0x0002
216 #define RDS_RDMA_INVALIDATE 0x0004
217 #define RDS_RDMA_USE_ONCE 0x0008
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219 #define RDS_RDMA_DONTWAIT 0x0010
220 #define RDS_RDMA_NOTIFY_ME 0x0020
221 #define RDS_RDMA_SILENT 0x0040
222 #endif
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224