diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-08-25 08:51:28 -0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:16:51 -0400 |
commit | 20c72bd5f5f902e5a8745d51573699605bf8d21c (patch) | |
tree | 6df337e07d423a0859ab92f25525570e134baba1 /include/linux/rds.h | |
parent | 59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (diff) |
RDS: Implement masked atomic operations
Add two CMSGs for masked versions of cswp and fadd. args
struct modified to use a union for different atomic op type's
arguments. Change IB to do masked atomic ops. Atomic op type
in rds_message similarly unionized.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'include/linux/rds.h')
-rw-r--r-- | include/linux/rds.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/rds.h b/include/linux/rds.h index 109f1d343318..a2a5edb4a276 100644 --- a/include/linux/rds.h +++ b/include/linux/rds.h | |||
@@ -75,6 +75,8 @@ | |||
75 | #define RDS_CMSG_CONG_UPDATE 5 | 75 | #define RDS_CMSG_CONG_UPDATE 5 |
76 | #define RDS_CMSG_ATOMIC_FADD 6 | 76 | #define RDS_CMSG_ATOMIC_FADD 6 |
77 | #define RDS_CMSG_ATOMIC_CSWP 7 | 77 | #define RDS_CMSG_ATOMIC_CSWP 7 |
78 | #define RDS_CMSG_MASKED_ATOMIC_FADD 8 | ||
79 | #define RDS_CMSG_MASKED_ATOMIC_CSWP 9 | ||
78 | 80 | ||
79 | #define RDS_INFO_FIRST 10000 | 81 | #define RDS_INFO_FIRST 10000 |
80 | #define RDS_INFO_COUNTERS 10000 | 82 | #define RDS_INFO_COUNTERS 10000 |
@@ -251,6 +253,16 @@ struct rds_atomic_args { | |||
251 | struct { | 253 | struct { |
252 | uint64_t add; | 254 | uint64_t add; |
253 | } fadd; | 255 | } fadd; |
256 | struct { | ||
257 | uint64_t compare; | ||
258 | uint64_t swap; | ||
259 | uint64_t compare_mask; | ||
260 | uint64_t swap_mask; | ||
261 | } m_cswp; | ||
262 | struct { | ||
263 | uint64_t add; | ||
264 | uint64_t nocarry_mask; | ||
265 | } m_fadd; | ||
254 | }; | 266 | }; |
255 | uint64_t flags; | 267 | uint64_t flags; |
256 | uint64_t user_token; | 268 | uint64_t user_token; |