diff options
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r-- | net/rds/rds.h | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h index 32b3d46aea36..76eeb5988b5f 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h | |||
@@ -230,22 +230,6 @@ struct rds_mr { | |||
230 | /* Flags for mr->r_state */ | 230 | /* Flags for mr->r_state */ |
231 | #define RDS_MR_DEAD 0 | 231 | #define RDS_MR_DEAD 0 |
232 | 232 | ||
233 | struct rds_rdma_op { | ||
234 | u32 r_key; | ||
235 | u64 r_remote_addr; | ||
236 | unsigned int r_write:1; | ||
237 | unsigned int r_fence:1; | ||
238 | unsigned int r_notify:1; | ||
239 | unsigned int r_recverr:1; | ||
240 | unsigned int r_mapped:1; | ||
241 | unsigned int r_active:1; | ||
242 | struct rds_notifier *r_notifier; | ||
243 | unsigned int r_bytes; | ||
244 | unsigned int r_nents; | ||
245 | unsigned int r_count; | ||
246 | struct scatterlist *r_sg; | ||
247 | }; | ||
248 | |||
249 | static inline rds_rdma_cookie_t rds_rdma_make_cookie(u32 r_key, u32 offset) | 233 | static inline rds_rdma_cookie_t rds_rdma_make_cookie(u32 r_key, u32 offset) |
250 | { | 234 | { |
251 | return r_key | (((u64) offset) << 32); | 235 | return r_key | (((u64) offset) << 32); |
@@ -331,14 +315,27 @@ struct rds_message { | |||
331 | unsigned int op_recverr:1; | 315 | unsigned int op_recverr:1; |
332 | unsigned int op_mapped:1; | 316 | unsigned int op_mapped:1; |
333 | unsigned int op_active:1; | 317 | unsigned int op_active:1; |
334 | struct rds_notifier *op_notifier; | ||
335 | struct scatterlist *op_sg; | 318 | struct scatterlist *op_sg; |
319 | struct rds_notifier *op_notifier; | ||
336 | 320 | ||
337 | struct rds_mr *op_rdma_mr; | 321 | struct rds_mr *op_rdma_mr; |
338 | } atomic; | 322 | } atomic; |
339 | struct rm_rdma_op { | 323 | struct rm_rdma_op { |
340 | struct rds_rdma_op m_rdma_op; | 324 | u32 op_rkey; |
341 | struct rds_mr *m_rdma_mr; | 325 | u64 op_remote_addr; |
326 | unsigned int op_write:1; | ||
327 | unsigned int op_fence:1; | ||
328 | unsigned int op_notify:1; | ||
329 | unsigned int op_recverr:1; | ||
330 | unsigned int op_mapped:1; | ||
331 | unsigned int op_active:1; | ||
332 | unsigned int op_bytes; | ||
333 | unsigned int op_nents; | ||
334 | unsigned int op_count; | ||
335 | struct scatterlist *op_sg; | ||
336 | struct rds_notifier *op_notifier; | ||
337 | |||
338 | struct rds_mr *op_rdma_mr; | ||
342 | } rdma; | 339 | } rdma; |
343 | struct rm_data_op { | 340 | struct rm_data_op { |
344 | unsigned int op_active:1; | 341 | unsigned int op_active:1; |
@@ -418,7 +415,7 @@ struct rds_transport { | |||
418 | unsigned int hdr_off, unsigned int sg, unsigned int off); | 415 | unsigned int hdr_off, unsigned int sg, unsigned int off); |
419 | int (*xmit_cong_map)(struct rds_connection *conn, | 416 | int (*xmit_cong_map)(struct rds_connection *conn, |
420 | struct rds_cong_map *map, unsigned long offset); | 417 | struct rds_cong_map *map, unsigned long offset); |
421 | int (*xmit_rdma)(struct rds_connection *conn, struct rds_rdma_op *op); | 418 | int (*xmit_rdma)(struct rds_connection *conn, struct rm_rdma_op *op); |
422 | int (*xmit_atomic)(struct rds_connection *conn, struct rds_message *rm); | 419 | int (*xmit_atomic)(struct rds_connection *conn, struct rds_message *rm); |
423 | int (*recv)(struct rds_connection *conn); | 420 | int (*recv)(struct rds_connection *conn); |
424 | int (*inc_copy_to_user)(struct rds_incoming *inc, struct iovec *iov, | 421 | int (*inc_copy_to_user)(struct rds_incoming *inc, struct iovec *iov, |
@@ -727,7 +724,7 @@ int rds_send_acked_before(struct rds_connection *conn, u64 seq); | |||
727 | void rds_send_remove_from_sock(struct list_head *messages, int status); | 724 | void rds_send_remove_from_sock(struct list_head *messages, int status); |
728 | int rds_send_pong(struct rds_connection *conn, __be16 dport); | 725 | int rds_send_pong(struct rds_connection *conn, __be16 dport); |
729 | struct rds_message *rds_send_get_message(struct rds_connection *, | 726 | struct rds_message *rds_send_get_message(struct rds_connection *, |
730 | struct rds_rdma_op *); | 727 | struct rm_rdma_op *); |
731 | 728 | ||
732 | /* rdma.c */ | 729 | /* rdma.c */ |
733 | void rds_rdma_unuse(struct rds_sock *rs, u32 r_key, int force); | 730 | void rds_rdma_unuse(struct rds_sock *rs, u32 r_key, int force); |
@@ -744,7 +741,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, | |||
744 | struct cmsghdr *cmsg); | 741 | struct cmsghdr *cmsg); |
745 | int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm, | 742 | int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm, |
746 | struct cmsghdr *cmsg); | 743 | struct cmsghdr *cmsg); |
747 | void rds_rdma_free_op(struct rds_rdma_op *ro); | 744 | void rds_rdma_free_op(struct rm_rdma_op *ro); |
748 | void rds_atomic_free_op(struct rm_atomic_op *ao); | 745 | void rds_atomic_free_op(struct rm_atomic_op *ao); |
749 | void rds_rdma_send_complete(struct rds_message *rm, int wc_status); | 746 | void rds_rdma_send_complete(struct rds_message *rm, int wc_status); |
750 | void rds_atomic_send_complete(struct rds_message *rm, int wc_status); | 747 | void rds_atomic_send_complete(struct rds_message *rm, int wc_status); |