Commit 8079fb78 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Handle additional connection events

Commit 38ca83a5 added RDMA_CM_EVENT_TIMEWAIT_EXIT. But that status
is relevant only for consumers that re-use their QPs on new
connections. xprtrdma creates a fresh QP on reconnection, so that
event should be explicitly ignored.

Squelch the alarming "unexpected CM event" message.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Tested-by: default avatarSteve Wise <swise@opengridcomputing.com>
Tested-by: default avatarShirley Ma <shirley.ma@oracle.com>
Tested-by: default avatarDevesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent a779ca5f
...@@ -326,8 +326,16 @@ static const char * const conn[] = { ...@@ -326,8 +326,16 @@ static const char * const conn[] = {
"rejected", "rejected",
"established", "established",
"disconnected", "disconnected",
"device removal" "device removal",
"multicast join",
"multicast error",
"address change",
"timewait exit",
}; };
#define CONNECTION_MSG(status) \
((status) < ARRAY_SIZE(conn) ? \
conn[(status)] : "unrecognized connection error")
#endif #endif
static int static int
...@@ -385,23 +393,18 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event) ...@@ -385,23 +393,18 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event)
case RDMA_CM_EVENT_DEVICE_REMOVAL: case RDMA_CM_EVENT_DEVICE_REMOVAL:
connstate = -ENODEV; connstate = -ENODEV;
connected: connected:
dprintk("RPC: %s: %s: %pI4:%u (ep 0x%p event 0x%x)\n",
__func__,
(event->event <= 11) ? conn[event->event] :
"unknown connection error",
&addr->sin_addr.s_addr,
ntohs(addr->sin_port),
ep, event->event);
atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1); atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1);
dprintk("RPC: %s: %sconnected\n", dprintk("RPC: %s: %sconnected\n",
__func__, connstate > 0 ? "" : "dis"); __func__, connstate > 0 ? "" : "dis");
ep->rep_connected = connstate; ep->rep_connected = connstate;
ep->rep_func(ep); ep->rep_func(ep);
wake_up_all(&ep->rep_connect_wait); wake_up_all(&ep->rep_connect_wait);
break; /*FALLTHROUGH*/
default: default:
dprintk("RPC: %s: unexpected CM event %d\n", dprintk("RPC: %s: %pI4:%u (ep 0x%p): %s\n",
__func__, event->event); __func__, &addr->sin_addr.s_addr,
ntohs(addr->sin_port), ep,
CONNECTION_MSG(event->event));
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment