summaryrefslogtreecommitdiffstats
path: root/include/linux/rds.h
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-08-25 05:51:28 -0700
committerAndy Grover <andy.grover@oracle.com>2010-09-08 18:16:51 -0700
commit20c72bd5f5f902e5a8745d51573699605bf8d21c (patch)
tree6df337e07d423a0859ab92f25525570e134baba1 /include/linux/rds.h
parent59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (diff)
downloadlinux-20c72bd5f5f902e5a8745d51573699605bf8d21c.tar.gz
linux-20c72bd5f5f902e5a8745d51573699605bf8d21c.tar.bz2
linux-20c72bd5f5f902e5a8745d51573699605bf8d21c.zip
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.h12
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 @@
#define RDS_CMSG_CONG_UPDATE 5
#define RDS_CMSG_ATOMIC_FADD 6
#define RDS_CMSG_ATOMIC_CSWP 7
+#define RDS_CMSG_MASKED_ATOMIC_FADD 8
+#define RDS_CMSG_MASKED_ATOMIC_CSWP 9
#define RDS_INFO_FIRST 10000
#define RDS_INFO_COUNTERS 10000
@@ -251,6 +253,16 @@ struct rds_atomic_args {
struct {
uint64_t add;
} fadd;
+ struct {
+ uint64_t compare;
+ uint64_t swap;
+ uint64_t compare_mask;
+ uint64_t swap_mask;
+ } m_cswp;
+ struct {
+ uint64_t add;
+ uint64_t nocarry_mask;
+ } m_fadd;
};
uint64_t flags;
uint64_t user_token;