Commit 07257450 authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

svcrdma: Break up dprintk format in svc_rdma_accept()

The current code results in:

Nov  7 14:50:19 klimt kernel: svcrdma: newxprt->sc_cm_id=ffff88085590c800,
 newxprt->sc_pd=ffff880852a7ce00#012    cm_id->device=ffff88084dd20000,
 sc_pd->device=ffff88084dd20000#012    cap.max_send_wr = 272#012
 cap.max_recv_wr = 34#012    cap.max_send_sge = 32#012
 cap.max_recv_sge = 32
Nov  7 14:50:19 klimt kernel: svcrdma: new connection ffff880855908000
 accepted with the following attributes:#012    local_ip        :
 10.0.0.5#012    local_port#011     : 20049#012    remote_ip       :
 10.0.0.2#012    remote_port     : 59909#012    max_sge         : 32#012
 max_sge_rd      : 30#012    sq_depth        : 272#012    max_requests    :
 32#012    ord             : 16

Split up the output over multiple dprintks and take the opportunity
to fix the display of IPv6 addresses.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent f5426d37
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
*/ */
#include <linux/sunrpc/svc_xprt.h> #include <linux/sunrpc/svc_xprt.h>
#include <linux/sunrpc/addr.h>
#include <linux/sunrpc/debug.h> #include <linux/sunrpc/debug.h>
#include <linux/sunrpc/rpc_rdma.h> #include <linux/sunrpc/rpc_rdma.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -966,6 +967,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) ...@@ -966,6 +967,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
struct rpcrdma_connect_private pmsg; struct rpcrdma_connect_private pmsg;
struct ib_qp_init_attr qp_attr; struct ib_qp_init_attr qp_attr;
struct ib_device *dev; struct ib_device *dev;
struct sockaddr *sap;
unsigned int i; unsigned int i;
int ret = 0; int ret = 0;
...@@ -1046,18 +1048,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) ...@@ -1046,18 +1048,12 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
qp_attr.qp_type = IB_QPT_RC; qp_attr.qp_type = IB_QPT_RC;
qp_attr.send_cq = newxprt->sc_sq_cq; qp_attr.send_cq = newxprt->sc_sq_cq;
qp_attr.recv_cq = newxprt->sc_rq_cq; qp_attr.recv_cq = newxprt->sc_rq_cq;
dprintk("svcrdma: newxprt->sc_cm_id=%p, newxprt->sc_pd=%p\n" dprintk("svcrdma: newxprt->sc_cm_id=%p, newxprt->sc_pd=%p\n",
" cm_id->device=%p, sc_pd->device=%p\n" newxprt->sc_cm_id, newxprt->sc_pd);
" cap.max_send_wr = %d\n" dprintk(" cap.max_send_wr = %d, cap.max_recv_wr = %d\n",
" cap.max_recv_wr = %d\n" qp_attr.cap.max_send_wr, qp_attr.cap.max_recv_wr);
" cap.max_send_sge = %d\n" dprintk(" cap.max_send_sge = %d, cap.max_recv_sge = %d\n",
" cap.max_recv_sge = %d\n", qp_attr.cap.max_send_sge, qp_attr.cap.max_recv_sge);
newxprt->sc_cm_id, newxprt->sc_pd,
dev, newxprt->sc_pd->device,
qp_attr.cap.max_send_wr,
qp_attr.cap.max_recv_wr,
qp_attr.cap.max_send_sge,
qp_attr.cap.max_recv_sge);
ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, &qp_attr); ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, &qp_attr);
if (ret) { if (ret) {
...@@ -1140,31 +1136,16 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) ...@@ -1140,31 +1136,16 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
goto errout; goto errout;
} }
dprintk("svcrdma: new connection %p accepted with the following " dprintk("svcrdma: new connection %p accepted:\n", newxprt);
"attributes:\n" sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
" local_ip : %pI4\n" dprintk(" local address : %pIS:%u\n", sap, rpc_get_port(sap));
" local_port : %d\n" sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
" remote_ip : %pI4\n" dprintk(" remote address : %pIS:%u\n", sap, rpc_get_port(sap));
" remote_port : %d\n" dprintk(" max_sge : %d\n", newxprt->sc_max_sge);
" max_sge : %d\n" dprintk(" max_sge_rd : %d\n", newxprt->sc_max_sge_rd);
" max_sge_rd : %d\n" dprintk(" sq_depth : %d\n", newxprt->sc_sq_depth);
" sq_depth : %d\n" dprintk(" max_requests : %d\n", newxprt->sc_max_requests);
" max_requests : %d\n" dprintk(" ord : %d\n", newxprt->sc_ord);
" ord : %d\n",
newxprt,
&((struct sockaddr_in *)&newxprt->sc_cm_id->
route.addr.src_addr)->sin_addr.s_addr,
ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
route.addr.src_addr)->sin_port),
&((struct sockaddr_in *)&newxprt->sc_cm_id->
route.addr.dst_addr)->sin_addr.s_addr,
ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
route.addr.dst_addr)->sin_port),
newxprt->sc_max_sge,
newxprt->sc_max_sge_rd,
newxprt->sc_sq_depth,
newxprt->sc_max_requests,
newxprt->sc_ord);
return &newxprt->sc_xprt; return &newxprt->sc_xprt;
......
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