diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-01-20 00:25:26 -0500 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:11:55 -0400 |
commit | 241eef3e2f51fe4ad50abacd7f79c4e2d468197e (patch) | |
tree | 020170cb9c3bea79d767b19cd7362a51b8446667 /net/rds/send.c | |
parent | d37c9359056f4f07b37e59810f0ece1031e280b2 (diff) |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 5bc35d2f40ea..42fb934293be 100644 --- a/net/rds/send.c +++ b/net/rds/send.c | |||
@@ -266,7 +266,7 @@ int rds_send_xmit(struct rds_connection *conn) | |||
266 | 266 | ||
267 | 267 | ||
268 | if (rm->atomic.op_active && !conn->c_xmit_atomic_sent) { | 268 | if (rm->atomic.op_active && !conn->c_xmit_atomic_sent) { |
269 | ret = conn->c_trans->xmit_atomic(conn, &rm->atomic); | 269 | ret = conn->c_trans->xmit_atomic(conn, rm); |
270 | if (ret) | 270 | if (ret) |
271 | break; | 271 | break; |
272 | conn->c_xmit_atomic_sent = 1; | 272 | conn->c_xmit_atomic_sent = 1; |
@@ -285,13 +285,18 @@ int rds_send_xmit(struct rds_connection *conn) | |||
285 | if (ret) | 285 | if (ret) |
286 | break; | 286 | break; |
287 | conn->c_xmit_rdma_sent = 1; | 287 | conn->c_xmit_rdma_sent = 1; |
288 | |||
289 | /* rdmas need data sent, even if just the header */ | ||
290 | rm->data.op_active = 1; | ||
291 | |||
288 | /* The transport owns the mapped memory for now. | 292 | /* The transport owns the mapped memory for now. |
289 | * You can't unmap it while it's on the send queue */ | 293 | * You can't unmap it while it's on the send queue */ |
290 | set_bit(RDS_MSG_MAPPED, &rm->m_flags); | 294 | set_bit(RDS_MSG_MAPPED, &rm->m_flags); |
291 | } | 295 | } |
292 | 296 | ||
293 | if (conn->c_xmit_hdr_off < sizeof(struct rds_header) || | 297 | if (rm->data.op_active |
294 | conn->c_xmit_sg < rm->data.m_nents) { | 298 | && (conn->c_xmit_hdr_off < sizeof(struct rds_header) || |
299 | conn->c_xmit_sg < rm->data.m_nents)) { | ||
295 | ret = conn->c_trans->xmit(conn, rm, | 300 | ret = conn->c_trans->xmit(conn, rm, |
296 | conn->c_xmit_hdr_off, | 301 | conn->c_xmit_hdr_off, |
297 | conn->c_xmit_sg, | 302 | conn->c_xmit_sg, |