From 77db91866e9e8b333017e3bdb3079d024bb94818 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 2 Sep 2010 07:04:48 +0000 Subject: rpc-transport/rdma: when rdma msg of type RDMA_ERROR is recieved, disconnect transport. Signed-off-by: Raghavendra G Signed-off-by: Vijay Bellur BUG: 1462 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1462 --- rpc/rpc-transport/rdma/src/rdma.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 4d210f2eea2..19f6a25a8e9 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -2860,7 +2860,7 @@ rdma_decode_header (rdma_peer_t *peer, rdma_post_t *post, break; case RDMA_ERROR: - ret = rdma_decode_error_msg (peer, post, bytes_in_post); + /* ret = rdma_decode_error_msg (peer, post, bytes_in_post); */ break; default: @@ -3208,13 +3208,20 @@ rdma_process_recv (rdma_peer_t *peer, struct ibv_wc *wc) break; case RDMA_ERROR: - ret = rdma_pollin_notify (peer, post); - if (ret == -1) { - gf_log (RDMA_LOG_NAME, GF_LOG_DEBUG, - "pollin notification failed"); - } + gf_log (RDMA_LOG_NAME, GF_LOG_ERROR, + "an error has happened while transmission of msg, " + "disconnecting the transport"); + rpc_transport_disconnect (peer->trans); goto out; +/* ret = rdma_pollin_notify (peer, post); + if (ret == -1) { + gf_log (RDMA_LOG_NAME, GF_LOG_DEBUG, + "pollin notification failed"); + } + goto out; +*/ + default: gf_log (RDMA_LOG_NAME, GF_LOG_DEBUG, "invalid rdma msg-type (%d)", header->rm_type); -- cgit