summaryrefslogtreecommitdiff
path: root/net/rds/send.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-01-20 05:25:26 (GMT)
committerAndy Grover <andy.grover@oracle.com>2010-09-09 01:11:55 (GMT)
commit241eef3e2f51fe4ad50abacd7f79c4e2d468197e (patch)
tree020170cb9c3bea79d767b19cd7362a51b8446667 /net/rds/send.c
parentd37c9359056f4f07b37e59810f0ece1031e280b2 (diff)
downloadlinux-241eef3e2f51fe4ad50abacd7f79c4e2d468197e.tar.xz
RDS: Implement silent atomics
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r--net/rds/send.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/rds/send.c b/net/rds/send.c
index 5bc35d2..42fb934 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -266,7 +266,7 @@ int rds_send_xmit(struct rds_connection *conn)
if (rm->atomic.op_active && !conn->c_xmit_atomic_sent) {
- ret = conn->c_trans->xmit_atomic(conn, &rm->atomic);
+ ret = conn->c_trans->xmit_atomic(conn, rm);
if (ret)
break;
conn->c_xmit_atomic_sent = 1;
@@ -285,13 +285,18 @@ int rds_send_xmit(struct rds_connection *conn)
if (ret)
break;
conn->c_xmit_rdma_sent = 1;
+
+ /* rdmas need data sent, even if just the header */
+ rm->data.op_active = 1;
+
/* The transport owns the mapped memory for now.
* You can't unmap it while it's on the send queue */
set_bit(RDS_MSG_MAPPED, &rm->m_flags);
}
- if (conn->c_xmit_hdr_off < sizeof(struct rds_header) ||
- conn->c_xmit_sg < rm->data.m_nents) {
+ if (rm->data.op_active
+ && (conn->c_xmit_hdr_off < sizeof(struct rds_header) ||
+ conn->c_xmit_sg < rm->data.m_nents)) {
ret = conn->c_trans->xmit(conn, rm,
conn->c_xmit_hdr_off,
conn->c_xmit_sg,