aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/send.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-08-25 08:51:28 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:16:51 -0400
commit20c72bd5f5f902e5a8745d51573699605bf8d21c (patch)
tree6df337e07d423a0859ab92f25525570e134baba1 /net/rds/send.c
parent59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (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 'net/rds/send.c')
-rw-r--r--net/rds/send.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rds/send.c b/net/rds/send.c
index 81471b25373b..9b951a0ab6b7 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -843,6 +843,8 @@ static int rds_rm_size(struct msghdr *msg, int data_len)
843 843
844 case RDS_CMSG_ATOMIC_CSWP: 844 case RDS_CMSG_ATOMIC_CSWP:
845 case RDS_CMSG_ATOMIC_FADD: 845 case RDS_CMSG_ATOMIC_FADD:
846 case RDS_CMSG_MASKED_ATOMIC_CSWP:
847 case RDS_CMSG_MASKED_ATOMIC_FADD:
846 cmsg_groups |= 1; 848 cmsg_groups |= 1;
847 size += sizeof(struct scatterlist); 849 size += sizeof(struct scatterlist);
848 break; 850 break;
@@ -894,6 +896,8 @@ static int rds_cmsg_send(struct rds_sock *rs, struct rds_message *rm,
894 break; 896 break;
895 case RDS_CMSG_ATOMIC_CSWP: 897 case RDS_CMSG_ATOMIC_CSWP:
896 case RDS_CMSG_ATOMIC_FADD: 898 case RDS_CMSG_ATOMIC_FADD:
899 case RDS_CMSG_MASKED_ATOMIC_CSWP:
900 case RDS_CMSG_MASKED_ATOMIC_FADD:
897 ret = rds_cmsg_atomic(rs, rm, cmsg); 901 ret = rds_cmsg_atomic(rs, rm, cmsg);
898 break; 902 break;
899 903