]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
RPC/RDMA: optionally emit useful transport info upon connect/disconnect.
authorTom Talpey <talpey@netapp.com>
Thu, 9 Oct 2008 19:02:02 +0000 (15:02 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 10 Oct 2008 19:13:59 +0000 (15:13 -0400)
Signed-off-by: Tom Talpey <talpey@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/verbs.c

index c7d2380bb5e371bc31c0649bc33b85fdd3deed73..c2da680273c56f8056e71b6a211c6c2f03f67fbb 100644 (file)
@@ -784,7 +784,7 @@ static void __exit xprt_rdma_cleanup(void)
 {
        int rc;
 
-       dprintk("RPCRDMA Module Removed, deregister RPC RDMA transport\n");
+       dprintk(KERN_INFO "RPCRDMA Module Removed, deregister RPC RDMA transport\n");
 #ifdef RPC_DEBUG
        if (sunrpc_table_header) {
                unregister_sysctl_table(sunrpc_table_header);
index f46fb93f421b3e723e011a111e456c09b6c1fe70..170e69cba6c4e58f63ec4ef357b3b006d57e883c 100644 (file)
@@ -344,6 +344,27 @@ connected:
                break;
        }
 
+#ifdef RPC_DEBUG
+       if (connstate == 1) {
+               int ird = attr.max_dest_rd_atomic;
+               int tird = ep->rep_remote_cma.responder_resources;
+               printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u "
+                       "on %s, memreg %d slots %d ird %d%s\n",
+                       NIPQUAD(addr->sin_addr.s_addr),
+                       ntohs(addr->sin_port),
+                       ia->ri_id->device->name,
+                       ia->ri_memreg_strategy,
+                       xprt->rx_buf.rb_max_requests,
+                       ird, ird < 4 && ird < tird / 2 ? " (low!)" : "");
+       } else if (connstate < 0) {
+               printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u "
+                       "closed (%d)\n",
+                       NIPQUAD(addr->sin_addr.s_addr),
+                       ntohs(addr->sin_port),
+                       connstate);
+       }
+#endif
+
        return 0;
 }