]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/rdma: check if fin message completed 15624/head
authorAdir Lev <adirl@mellanox.com>
Sun, 30 Apr 2017 11:34:43 +0000 (11:34 +0000)
committerAdir Lev <adirl@mellanox.com>
Mon, 12 Jun 2017 13:52:17 +0000 (13:52 +0000)
Change-Id: I9cb1e523be7b21127503a9252b09331a37bea204
Signed-off-by: Alexander Mikheev <alexm@mellanox.com>
Signed-off-by: Adir Lev <adirl@mellanox.com>
src/msg/async/rdma/RDMAStack.cc

index 77cb4b7a9630209d949960cd7ab52c063043da66..608c4f5c91ce39d45b0e731ebfed647667992385 100644 (file)
@@ -362,11 +362,16 @@ void RDMADispatcher::handle_tx_event(ibv_wc *cqe, int n)
       }
     }
 
-    // FIXME: why not tx?
-    if (global_infiniband->get_memory_manager()->is_tx_buffer(chunk->buffer))
+    //TX completion may come either from regular send message or from 'fin' message.
+    //In the case of 'fin' wr_id points to the QueuePair.
+    if (global_infiniband->get_memory_manager()->is_tx_buffer(chunk->buffer)) {
       tx_chunks.push_back(chunk);
-    else
+    } else if (reinterpret_cast<QueuePair*>(response->wr_id)->get_local_qp_number() == response->qp_num ) {
+      ldout(cct, 1) << __func__ << " sending of the disconnect msg completed" << dendl;
+    } else {
       ldout(cct, 1) << __func__ << " not tx buffer, chunk " << chunk << dendl;
+      ceph_abort();
+    }
   }
 
   perf_logger->inc(l_msgr_rdma_tx_total_wc, n);