aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rds.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rds.h')
-rw-r--r--include/linux/rds.h106
1 files changed, 65 insertions, 41 deletions
diff --git a/include/linux/rds.h b/include/linux/rds.h
index 7f3971d9fc5c..91950950aa59 100644
--- a/include/linux/rds.h
+++ b/include/linux/rds.h
@@ -73,6 +73,10 @@
73#define RDS_CMSG_RDMA_MAP 3 73#define RDS_CMSG_RDMA_MAP 3
74#define RDS_CMSG_RDMA_STATUS 4 74#define RDS_CMSG_RDMA_STATUS 4
75#define RDS_CMSG_CONG_UPDATE 5 75#define RDS_CMSG_CONG_UPDATE 5
76#define RDS_CMSG_ATOMIC_FADD 6
77#define RDS_CMSG_ATOMIC_CSWP 7
78#define RDS_CMSG_MASKED_ATOMIC_FADD 8
79#define RDS_CMSG_MASKED_ATOMIC_CSWP 9
76 80
77#define RDS_INFO_FIRST 10000 81#define RDS_INFO_FIRST 10000
78#define RDS_INFO_COUNTERS 10000 82#define RDS_INFO_COUNTERS 10000
@@ -89,9 +93,9 @@
89#define RDS_INFO_LAST 10010 93#define RDS_INFO_LAST 10010
90 94
91struct rds_info_counter { 95struct rds_info_counter {
92 u_int8_t name[32]; 96 uint8_t name[32];
93 u_int64_t value; 97 uint64_t value;
94} __packed; 98} __attribute__((packed));
95 99
96#define RDS_INFO_CONNECTION_FLAG_SENDING 0x01 100#define RDS_INFO_CONNECTION_FLAG_SENDING 0x01
97#define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02 101#define RDS_INFO_CONNECTION_FLAG_CONNECTING 0x02
@@ -100,56 +104,48 @@ struct rds_info_counter {
100#define TRANSNAMSIZ 16 104#define TRANSNAMSIZ 16
101 105
102struct rds_info_connection { 106struct rds_info_connection {
103 u_int64_t next_tx_seq; 107 uint64_t next_tx_seq;
104 u_int64_t next_rx_seq; 108 uint64_t next_rx_seq;
105 __be32 laddr; 109 __be32 laddr;
106 __be32 faddr; 110 __be32 faddr;
107 u_int8_t transport[TRANSNAMSIZ]; /* null term ascii */ 111 uint8_t transport[TRANSNAMSIZ]; /* null term ascii */
108 u_int8_t flags; 112 uint8_t flags;
109} __packed; 113} __attribute__((packed));
110
111struct rds_info_flow {
112 __be32 laddr;
113 __be32 faddr;
114 u_int32_t bytes;
115 __be16 lport;
116 __be16 fport;
117} __packed;
118 114
119#define RDS_INFO_MESSAGE_FLAG_ACK 0x01 115#define RDS_INFO_MESSAGE_FLAG_ACK 0x01
120#define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02 116#define RDS_INFO_MESSAGE_FLAG_FAST_ACK 0x02
121 117
122struct rds_info_message { 118struct rds_info_message {
123 u_int64_t seq; 119 uint64_t seq;
124 u_int32_t len; 120 uint32_t len;
125 __be32 laddr; 121 __be32 laddr;
126 __be32 faddr; 122 __be32 faddr;
127 __be16 lport; 123 __be16 lport;
128 __be16 fport; 124 __be16 fport;
129 u_int8_t flags; 125 uint8_t flags;
130} __packed; 126} __attribute__((packed));
131 127
132struct rds_info_socket { 128struct rds_info_socket {
133 u_int32_t sndbuf; 129 uint32_t sndbuf;
134 __be32 bound_addr; 130 __be32 bound_addr;
135 __be32 connected_addr; 131 __be32 connected_addr;
136 __be16 bound_port; 132 __be16 bound_port;
137 __be16 connected_port; 133 __be16 connected_port;
138 u_int32_t rcvbuf; 134 uint32_t rcvbuf;
139 u_int64_t inum; 135 uint64_t inum;
140} __packed; 136} __attribute__((packed));
141 137
142struct rds_info_tcp_socket { 138struct rds_info_tcp_socket {
143 __be32 local_addr; 139 __be32 local_addr;
144 __be16 local_port; 140 __be16 local_port;
145 __be32 peer_addr; 141 __be32 peer_addr;
146 __be16 peer_port; 142 __be16 peer_port;
147 u_int64_t hdr_rem; 143 uint64_t hdr_rem;
148 u_int64_t data_rem; 144 uint64_t data_rem;
149 u_int32_t last_sent_nxt; 145 uint32_t last_sent_nxt;
150 u_int32_t last_expected_una; 146 uint32_t last_expected_una;
151 u_int32_t last_seen_una; 147 uint32_t last_seen_una;
152} __packed; 148} __attribute__((packed));
153 149
154#define RDS_IB_GID_LEN 16 150#define RDS_IB_GID_LEN 16
155struct rds_info_rdma_connection { 151struct rds_info_rdma_connection {
@@ -203,42 +199,69 @@ struct rds_info_rdma_connection {
203 * (so that the application does not have to worry about 199 * (so that the application does not have to worry about
204 * alignment). 200 * alignment).
205 */ 201 */
206typedef u_int64_t rds_rdma_cookie_t; 202typedef uint64_t rds_rdma_cookie_t;
207 203
208struct rds_iovec { 204struct rds_iovec {
209 u_int64_t addr; 205 uint64_t addr;
210 u_int64_t bytes; 206 uint64_t bytes;
211}; 207};
212 208
213struct rds_get_mr_args { 209struct rds_get_mr_args {
214 struct rds_iovec vec; 210 struct rds_iovec vec;
215 u_int64_t cookie_addr; 211 uint64_t cookie_addr;
216 uint64_t flags; 212 uint64_t flags;
217}; 213};
218 214
219struct rds_get_mr_for_dest_args { 215struct rds_get_mr_for_dest_args {
220 struct sockaddr_storage dest_addr; 216 struct sockaddr_storage dest_addr;
221 struct rds_iovec vec; 217 struct rds_iovec vec;
222 u_int64_t cookie_addr; 218 uint64_t cookie_addr;
223 uint64_t flags; 219 uint64_t flags;
224}; 220};
225 221
226struct rds_free_mr_args { 222struct rds_free_mr_args {
227 rds_rdma_cookie_t cookie; 223 rds_rdma_cookie_t cookie;
228 u_int64_t flags; 224 uint64_t flags;
229}; 225};
230 226
231struct rds_rdma_args { 227struct rds_rdma_args {
232 rds_rdma_cookie_t cookie; 228 rds_rdma_cookie_t cookie;
233 struct rds_iovec remote_vec; 229 struct rds_iovec remote_vec;
234 u_int64_t local_vec_addr; 230 uint64_t local_vec_addr;
235 u_int64_t nr_local; 231 uint64_t nr_local;
236 u_int64_t flags; 232 uint64_t flags;
237 u_int64_t user_token; 233 uint64_t user_token;
234};
235
236struct rds_atomic_args {
237 rds_rdma_cookie_t cookie;
238 uint64_t local_addr;
239 uint64_t remote_addr;
240 union {
241 struct {
242 uint64_t compare;
243 uint64_t swap;
244 } cswp;
245 struct {
246 uint64_t add;
247 } fadd;
248 struct {
249 uint64_t compare;
250 uint64_t swap;
251 uint64_t compare_mask;
252 uint64_t swap_mask;
253 } m_cswp;
254 struct {
255 uint64_t add;
256 uint64_t nocarry_mask;
257 } m_fadd;
258 };
259 uint64_t flags;
260 uint64_t user_token;
238}; 261};
239 262
240struct rds_rdma_notify { 263struct rds_rdma_notify {
241 u_int64_t user_token; 264 uint64_t user_token;
242 int32_t status; 265 int32_t status;
243}; 266};
244 267
@@ -257,5 +280,6 @@ struct rds_rdma_notify {
257#define RDS_RDMA_USE_ONCE 0x0008 /* free MR after use */ 280#define RDS_RDMA_USE_ONCE 0x0008 /* free MR after use */
258#define RDS_RDMA_DONTWAIT 0x0010 /* Don't wait in SET_BARRIER */ 281#define RDS_RDMA_DONTWAIT 0x0010 /* Don't wait in SET_BARRIER */
259#define RDS_RDMA_NOTIFY_ME 0x0020 /* Notify when operation completes */ 282#define RDS_RDMA_NOTIFY_ME 0x0020 /* Notify when operation completes */
283#define RDS_RDMA_SILENT 0x0040 /* Do not interrupt remote */
260 284
261#endif /* IB_RDS_H */ 285#endif /* IB_RDS_H */