diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-01-12 17:33:38 -0500 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:11:41 -0400 |
commit | 15133f6e67d8d646d0744336b4daa3135452cb0d (patch) | |
tree | e5675d5a3ab240edc9a66af6b891dd75fa9eabae /include/linux/rds.h | |
parent | a63273d4992603979ddb181b6a8f07082839b39f (diff) |
RDS: Implement atomic operations
Implement a CMSG-based interface to do FADD and CSWP ops.
Alter send routines to handle atomic ops.
Add atomic counters to stats.
Add xmit_atomic() to struct rds_transport
Inline rds_ib_send_unmap_rdma into unmap_rm
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'include/linux/rds.h')
-rw-r--r-- | include/linux/rds.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/rds.h b/include/linux/rds.h index 7f3971d9fc5c..9239152abf7a 100644 --- a/include/linux/rds.h +++ b/include/linux/rds.h | |||
@@ -73,6 +73,8 @@ | |||
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 | ||
76 | 78 | ||
77 | #define RDS_INFO_FIRST 10000 | 79 | #define RDS_INFO_FIRST 10000 |
78 | #define RDS_INFO_COUNTERS 10000 | 80 | #define RDS_INFO_COUNTERS 10000 |
@@ -237,6 +239,23 @@ struct rds_rdma_args { | |||
237 | u_int64_t user_token; | 239 | u_int64_t user_token; |
238 | }; | 240 | }; |
239 | 241 | ||
242 | struct rds_atomic_args { | ||
243 | rds_rdma_cookie_t cookie; | ||
244 | uint64_t local_addr; | ||
245 | uint64_t remote_addr; | ||
246 | union { | ||
247 | struct { | ||
248 | uint64_t compare; | ||
249 | uint64_t swap; | ||
250 | } cswp; | ||
251 | struct { | ||
252 | uint64_t add; | ||
253 | } fadd; | ||
254 | }; | ||
255 | uint64_t flags; | ||
256 | uint64_t user_token; | ||
257 | }; | ||
258 | |||
240 | struct rds_rdma_notify { | 259 | struct rds_rdma_notify { |
241 | u_int64_t user_token; | 260 | u_int64_t user_token; |
242 | int32_t status; | 261 | int32_t status; |