summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index b88b884d590..a3f6e3f59c0 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -3415,8 +3415,9 @@ rdma_handle_failed_send_completion (rdma_peer_t *peer, struct ibv_wc *wc)
void
rdma_handle_successful_send_completion (rdma_peer_t *peer, struct ibv_wc *wc)
{
- rdma_post_t *post = NULL;
- int reads = 0, ret = 0;
+ rdma_post_t *post = NULL;
+ int reads = 0, ret = 0;
+ rdma_header_t *header = NULL;
if (wc->opcode != IBV_WC_RDMA_READ) {
goto out;
@@ -3435,6 +3436,13 @@ rdma_handle_successful_send_completion (rdma_peer_t *peer, struct ibv_wc *wc)
goto out;
}
+ header = (rdma_header_t *)post->buf;
+
+ if (header->rm_type == RDMA_NOMSG) {
+ post->ctx.count = 1;
+ post->ctx.vector[0].iov_len += post->ctx.vector[1].iov_len;
+ }
+
ret = rdma_pollin_notify (peer, post);
if ((ret == -1) && (peer != NULL)) {
rpc_transport_disconnect (peer->trans);