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

xprtrdma: Cull dprintk() call sites

Clean up: Remove dprintk() call sites that report rare or impossible
errors. Leave a few that display high-value low noise status
information.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 92f4433e
...@@ -235,9 +235,6 @@ void xprt_rdma_bc_free_rqst(struct rpc_rqst *rqst) ...@@ -235,9 +235,6 @@ void xprt_rdma_bc_free_rqst(struct rpc_rqst *rqst)
struct rpcrdma_req *req = rpcr_to_rdmar(rqst); struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
struct rpc_xprt *xprt = rqst->rq_xprt; struct rpc_xprt *xprt = rqst->rq_xprt;
dprintk("RPC: %s: freeing rqst %p (req %p)\n",
__func__, rqst, req);
rpcrdma_recv_buffer_put(req->rl_reply); rpcrdma_recv_buffer_put(req->rl_reply);
req->rl_reply = NULL; req->rl_reply = NULL;
......
...@@ -1186,17 +1186,20 @@ rpcrdma_decode_error(struct rpcrdma_xprt *r_xprt, struct rpcrdma_rep *rep, ...@@ -1186,17 +1186,20 @@ rpcrdma_decode_error(struct rpcrdma_xprt *r_xprt, struct rpcrdma_rep *rep,
p = xdr_inline_decode(xdr, 2 * sizeof(*p)); p = xdr_inline_decode(xdr, 2 * sizeof(*p));
if (!p) if (!p)
break; break;
dprintk("RPC: %5u: %s: server reports version error (%u-%u)\n", dprintk("RPC: %s: server reports "
rqst->rq_task->tk_pid, __func__, "version error (%u-%u), xid %08x\n", __func__,
be32_to_cpup(p), be32_to_cpu(*(p + 1))); be32_to_cpup(p), be32_to_cpu(*(p + 1)),
be32_to_cpu(rep->rr_xid));
break; break;
case err_chunk: case err_chunk:
dprintk("RPC: %5u: %s: server reports header decoding error\n", dprintk("RPC: %s: server reports "
rqst->rq_task->tk_pid, __func__); "header decoding error, xid %08x\n", __func__,
be32_to_cpu(rep->rr_xid));
break; break;
default: default:
dprintk("RPC: %5u: %s: server reports unrecognized error %d\n", dprintk("RPC: %s: server reports "
rqst->rq_task->tk_pid, __func__, be32_to_cpup(p)); "unrecognized error %d, xid %08x\n", __func__,
be32_to_cpup(p), be32_to_cpu(rep->rr_xid));
} }
r_xprt->rx_stats.bad_reply_count++; r_xprt->rx_stats.bad_reply_count++;
......
...@@ -318,17 +318,12 @@ xprt_setup_rdma(struct xprt_create *args) ...@@ -318,17 +318,12 @@ xprt_setup_rdma(struct xprt_create *args)
struct sockaddr *sap; struct sockaddr *sap;
int rc; int rc;
if (args->addrlen > sizeof(xprt->addr)) { if (args->addrlen > sizeof(xprt->addr))
dprintk("RPC: %s: address too large\n", __func__);
return ERR_PTR(-EBADF); return ERR_PTR(-EBADF);
}
xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt), 0, 0); xprt = xprt_alloc(args->net, sizeof(struct rpcrdma_xprt), 0, 0);
if (xprt == NULL) { if (!xprt)
dprintk("RPC: %s: couldn't allocate rpcrdma_xprt\n",
__func__);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
}
/* 60 second timeout, no retries */ /* 60 second timeout, no retries */
xprt->timeout = &xprt_rdma_default_timeout; xprt->timeout = &xprt_rdma_default_timeout;
...@@ -445,8 +440,6 @@ void xprt_rdma_close(struct rpc_xprt *xprt) ...@@ -445,8 +440,6 @@ void xprt_rdma_close(struct rpc_xprt *xprt)
might_sleep(); might_sleep();
dprintk("RPC: %s: closing xprt %p\n", __func__, xprt);
/* Prevent marshaling and sending of new requests */ /* Prevent marshaling and sending of new requests */
xprt_clear_connected(xprt); xprt_clear_connected(xprt);
...@@ -853,24 +846,15 @@ static struct xprt_class xprt_rdma = { ...@@ -853,24 +846,15 @@ static struct xprt_class xprt_rdma = {
void xprt_rdma_cleanup(void) void xprt_rdma_cleanup(void)
{ {
int rc;
dprintk("RPCRDMA Module Removed, deregister RPC RDMA transport\n");
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
if (sunrpc_table_header) { if (sunrpc_table_header) {
unregister_sysctl_table(sunrpc_table_header); unregister_sysctl_table(sunrpc_table_header);
sunrpc_table_header = NULL; sunrpc_table_header = NULL;
} }
#endif #endif
rc = xprt_unregister_transport(&xprt_rdma);
if (rc)
dprintk("RPC: %s: xprt_unregister returned %i\n",
__func__, rc);
rc = xprt_unregister_transport(&xprt_rdma_bc); xprt_unregister_transport(&xprt_rdma);
if (rc) xprt_unregister_transport(&xprt_rdma_bc);
dprintk("RPC: %s: xprt_unregister(bc) returned %i\n",
__func__, rc);
} }
int xprt_rdma_init(void) int xprt_rdma_init(void)
...@@ -887,15 +871,6 @@ int xprt_rdma_init(void) ...@@ -887,15 +871,6 @@ int xprt_rdma_init(void)
return rc; return rc;
} }
dprintk("RPCRDMA Module Init, register RPC RDMA transport\n");
dprintk("Defaults:\n");
dprintk("\tSlots %d\n"
"\tMaxInlineRead %d\n\tMaxInlineWrite %d\n",
xprt_rdma_slot_table_entries,
xprt_rdma_max_inline_read, xprt_rdma_max_inline_write);
dprintk("\tPadding 0\n\tMemreg %d\n", xprt_rdma_memreg_strategy);
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
if (!sunrpc_table_header) if (!sunrpc_table_header)
sunrpc_table_header = register_sysctl_table(sunrpc_table); sunrpc_table_header = register_sysctl_table(sunrpc_table);
......
...@@ -309,22 +309,15 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt, struct rpcrdma_ia *ia) ...@@ -309,22 +309,15 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt, struct rpcrdma_ia *ia)
id = rdma_create_id(xprt->rx_xprt.xprt_net, rpcrdma_cm_event_handler, id = rdma_create_id(xprt->rx_xprt.xprt_net, rpcrdma_cm_event_handler,
xprt, RDMA_PS_TCP, IB_QPT_RC); xprt, RDMA_PS_TCP, IB_QPT_RC);
if (IS_ERR(id)) { if (IS_ERR(id))
rc = PTR_ERR(id);
dprintk("RPC: %s: rdma_create_id() failed %i\n",
__func__, rc);
return id; return id;
}
ia->ri_async_rc = -ETIMEDOUT; ia->ri_async_rc = -ETIMEDOUT;
rc = rdma_resolve_addr(id, NULL, rc = rdma_resolve_addr(id, NULL,
(struct sockaddr *)&xprt->rx_xprt.addr, (struct sockaddr *)&xprt->rx_xprt.addr,
RDMA_RESOLVE_TIMEOUT); RDMA_RESOLVE_TIMEOUT);
if (rc) { if (rc)
dprintk("RPC: %s: rdma_resolve_addr() failed %i\n",
__func__, rc);
goto out; goto out;
}
rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout); rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout);
if (rc < 0) { if (rc < 0) {
trace_xprtrdma_conn_tout(xprt); trace_xprtrdma_conn_tout(xprt);
...@@ -337,11 +330,8 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt, struct rpcrdma_ia *ia) ...@@ -337,11 +330,8 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt, struct rpcrdma_ia *ia)
ia->ri_async_rc = -ETIMEDOUT; ia->ri_async_rc = -ETIMEDOUT;
rc = rdma_resolve_route(id, RDMA_RESOLVE_TIMEOUT); rc = rdma_resolve_route(id, RDMA_RESOLVE_TIMEOUT);
if (rc) { if (rc)
dprintk("RPC: %s: rdma_resolve_route() failed %i\n",
__func__, rc);
goto out; goto out;
}
rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout); rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout);
if (rc < 0) { if (rc < 0) {
trace_xprtrdma_conn_tout(xprt); trace_xprtrdma_conn_tout(xprt);
...@@ -540,8 +530,6 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia, ...@@ -540,8 +530,6 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
1, IB_POLL_WORKQUEUE); 1, IB_POLL_WORKQUEUE);
if (IS_ERR(sendcq)) { if (IS_ERR(sendcq)) {
rc = PTR_ERR(sendcq); rc = PTR_ERR(sendcq);
dprintk("RPC: %s: failed to create send CQ: %i\n",
__func__, rc);
goto out1; goto out1;
} }
...@@ -550,8 +538,6 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia, ...@@ -550,8 +538,6 @@ rpcrdma_ep_create(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia,
0, IB_POLL_WORKQUEUE); 0, IB_POLL_WORKQUEUE);
if (IS_ERR(recvcq)) { if (IS_ERR(recvcq)) {
rc = PTR_ERR(recvcq); rc = PTR_ERR(recvcq);
dprintk("RPC: %s: failed to create recv CQ: %i\n",
__func__, rc);
goto out2; goto out2;
} }
...@@ -691,11 +677,8 @@ rpcrdma_ep_reconnect(struct rpcrdma_xprt *r_xprt, struct rpcrdma_ep *ep, ...@@ -691,11 +677,8 @@ rpcrdma_ep_reconnect(struct rpcrdma_xprt *r_xprt, struct rpcrdma_ep *ep,
} }
err = rdma_create_qp(id, ia->ri_pd, &ep->rep_attr); err = rdma_create_qp(id, ia->ri_pd, &ep->rep_attr);
if (err) { if (err)
dprintk("RPC: %s: rdma_create_qp returned %d\n",
__func__, err);
goto out_destroy; goto out_destroy;
}
/* Atomically replace the transport's ID and QP. */ /* Atomically replace the transport's ID and QP. */
rc = 0; rc = 0;
...@@ -726,8 +709,6 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia) ...@@ -726,8 +709,6 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)
dprintk("RPC: %s: connecting...\n", __func__); dprintk("RPC: %s: connecting...\n", __func__);
rc = rdma_create_qp(ia->ri_id, ia->ri_pd, &ep->rep_attr); rc = rdma_create_qp(ia->ri_id, ia->ri_pd, &ep->rep_attr);
if (rc) { if (rc) {
dprintk("RPC: %s: rdma_create_qp failed %i\n",
__func__, rc);
rc = -ENETUNREACH; rc = -ENETUNREACH;
goto out_noupdate; goto out_noupdate;
} }
...@@ -749,11 +730,8 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia) ...@@ -749,11 +730,8 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)
rpcrdma_post_recvs(r_xprt, true); rpcrdma_post_recvs(r_xprt, true);
rc = rdma_connect(ia->ri_id, &ep->rep_remote_cma); rc = rdma_connect(ia->ri_id, &ep->rep_remote_cma);
if (rc) { if (rc)
dprintk("RPC: %s: rdma_connect() failed with %i\n",
__func__, rc);
goto out; goto out;
}
wait_event_interruptible(ep->rep_connect_wait, ep->rep_connected != 0); wait_event_interruptible(ep->rep_connect_wait, ep->rep_connected != 0);
if (ep->rep_connected <= 0) { if (ep->rep_connected <= 0) {
...@@ -1088,8 +1066,6 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt, bool temp) ...@@ -1088,8 +1066,6 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt, bool temp)
out_free: out_free:
kfree(rep); kfree(rep);
out: out:
dprintk("RPC: %s: reply buffer %d alloc failed\n",
__func__, rc);
return rc; return rc;
} }
......
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