aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/rds.h
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-01 17:11:53 -0500
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:11:58 -0400
commitf8b3aaf2ba8ca9e27b47f8bfdff07c8b968f2c05 (patch)
tree42de574167e590ca2e413314b6486df916cd1f31 /net/rds/rds.h
parentd0ab25a83c4a08cd98b73a37d3f4c069f7b4f50b (diff)
RDS: Remove struct rds_rdma_op
A big changeset, but it's all pretty dumb. struct rds_rdma_op was already embedded in struct rm_rdma_op. Remove rds_rdma_op and put its members in rm_rdma_op. Rename members with "op_" prefix instead of "r_", for consistency. Of course this breaks a lot, so fixup the code accordingly. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r--net/rds/rds.h41
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
233struct 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
249static inline rds_rdma_cookie_t rds_rdma_make_cookie(u32 r_key, u32 offset) 233static 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);
727void rds_send_remove_from_sock(struct list_head *messages, int status); 724void rds_send_remove_from_sock(struct list_head *messages, int status);
728int rds_send_pong(struct rds_connection *conn, __be16 dport); 725int rds_send_pong(struct rds_connection *conn, __be16 dport);
729struct rds_message *rds_send_get_message(struct rds_connection *, 726struct 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 */
733void rds_rdma_unuse(struct rds_sock *rs, u32 r_key, int force); 730void 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);
745int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm, 742int rds_cmsg_rdma_map(struct rds_sock *rs, struct rds_message *rm,
746 struct cmsghdr *cmsg); 743 struct cmsghdr *cmsg);
747void rds_rdma_free_op(struct rds_rdma_op *ro); 744void rds_rdma_free_op(struct rm_rdma_op *ro);
748void rds_atomic_free_op(struct rm_atomic_op *ao); 745void rds_atomic_free_op(struct rm_atomic_op *ao);
749void rds_rdma_send_complete(struct rds_message *rm, int wc_status); 746void rds_rdma_send_complete(struct rds_message *rm, int wc_status);
750void rds_atomic_send_complete(struct rds_message *rm, int wc_status); 747void rds_atomic_send_complete(struct rds_message *rm, int wc_status);