Commit ed97f1f7 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Conventional variable names in rpcrdma_conn_upcall

Clean up: The convention throughout other parts of xprtrdma is to
name variables of type struct rpcrdma_xprt "r_xprt", not "xprt".
This convention enables the use of the name "xprt" for a "struct
rpc_xprt" type variable, as in other parts of the RPC client.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent ae38288e
...@@ -230,14 +230,15 @@ rpcrdma_update_connect_private(struct rpcrdma_xprt *r_xprt, ...@@ -230,14 +230,15 @@ rpcrdma_update_connect_private(struct rpcrdma_xprt *r_xprt,
static int static int
rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
{ {
struct rpcrdma_xprt *xprt = id->context; struct rpcrdma_xprt *r_xprt = id->context;
struct rpcrdma_ia *ia = &xprt->rx_ia; struct rpcrdma_ia *ia = &r_xprt->rx_ia;
struct rpcrdma_ep *ep = &xprt->rx_ep; struct rpcrdma_ep *ep = &r_xprt->rx_ep;
struct rpc_xprt *xprt = &r_xprt->rx_xprt;
int connstate = 0; int connstate = 0;
might_sleep(); might_sleep();
trace_xprtrdma_cm_event(xprt, event); trace_xprtrdma_cm_event(r_xprt, event);
switch (event->event) { switch (event->event) {
case RDMA_CM_EVENT_ADDR_RESOLVED: case RDMA_CM_EVENT_ADDR_RESOLVED:
case RDMA_CM_EVENT_ROUTE_RESOLVED: case RDMA_CM_EVENT_ROUTE_RESOLVED:
...@@ -256,11 +257,11 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) ...@@ -256,11 +257,11 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
pr_info("rpcrdma: removing device %s for %s:%s\n", pr_info("rpcrdma: removing device %s for %s:%s\n",
ia->ri_device->name, ia->ri_device->name,
rpcrdma_addrstr(xprt), rpcrdma_portstr(xprt)); rpcrdma_addrstr(r_xprt), rpcrdma_portstr(r_xprt));
#endif #endif
set_bit(RPCRDMA_IAF_REMOVING, &ia->ri_flags); set_bit(RPCRDMA_IAF_REMOVING, &ia->ri_flags);
ep->rep_connected = -ENODEV; ep->rep_connected = -ENODEV;
xprt_force_disconnect(&xprt->rx_xprt); xprt_force_disconnect(xprt);
wait_for_completion(&ia->ri_remove_done); wait_for_completion(&ia->ri_remove_done);
ia->ri_id = NULL; ia->ri_id = NULL;
...@@ -268,9 +269,9 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) ...@@ -268,9 +269,9 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
/* Return 1 to ensure the core destroys the id. */ /* Return 1 to ensure the core destroys the id. */
return 1; return 1;
case RDMA_CM_EVENT_ESTABLISHED: case RDMA_CM_EVENT_ESTABLISHED:
++xprt->rx_xprt.connect_cookie; ++xprt->connect_cookie;
connstate = 1; connstate = 1;
rpcrdma_update_connect_private(xprt, &event->param.conn); rpcrdma_update_connect_private(r_xprt, &event->param.conn);
goto connected; goto connected;
case RDMA_CM_EVENT_CONNECT_ERROR: case RDMA_CM_EVENT_CONNECT_ERROR:
connstate = -ENOTCONN; connstate = -ENOTCONN;
...@@ -280,14 +281,14 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) ...@@ -280,14 +281,14 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
goto connected; goto connected;
case RDMA_CM_EVENT_REJECTED: case RDMA_CM_EVENT_REJECTED:
dprintk("rpcrdma: connection to %s:%s rejected: %s\n", dprintk("rpcrdma: connection to %s:%s rejected: %s\n",
rpcrdma_addrstr(xprt), rpcrdma_portstr(xprt), rpcrdma_addrstr(r_xprt), rpcrdma_portstr(r_xprt),
rdma_reject_msg(id, event->status)); rdma_reject_msg(id, event->status));
connstate = -ECONNREFUSED; connstate = -ECONNREFUSED;
if (event->status == IB_CM_REJ_STALE_CONN) if (event->status == IB_CM_REJ_STALE_CONN)
connstate = -EAGAIN; connstate = -EAGAIN;
goto connected; goto connected;
case RDMA_CM_EVENT_DISCONNECTED: case RDMA_CM_EVENT_DISCONNECTED:
++xprt->rx_xprt.connect_cookie; ++xprt->connect_cookie;
connstate = -ECONNABORTED; connstate = -ECONNABORTED;
connected: connected:
ep->rep_connected = connstate; ep->rep_connected = connstate;
...@@ -297,7 +298,7 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) ...@@ -297,7 +298,7 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
default: default:
dprintk("RPC: %s: %s:%s on %s/%s (ep 0x%p): %s\n", dprintk("RPC: %s: %s:%s on %s/%s (ep 0x%p): %s\n",
__func__, __func__,
rpcrdma_addrstr(xprt), rpcrdma_portstr(xprt), rpcrdma_addrstr(r_xprt), rpcrdma_portstr(r_xprt),
ia->ri_device->name, ia->ri_ops->ro_displayname, ia->ri_device->name, ia->ri_ops->ro_displayname,
ep, rdma_event_msg(event->event)); ep, rdma_event_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