aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVipul Pandya <vipul@chelsio.com>2012-05-18 05:59:31 -0400
committerRoland Dreier <roland@purestorage.com>2012-05-18 16:22:35 -0400
commitd716a2a014ad199362a59004b5ab932030a213ff (patch)
tree017187fbcac3194075648f1538b43ebb34be8ee1
parent422eea0a8cf658bc9564726d74e8384b89a8f4fa (diff)
RDMA/cxgb4: Use vmalloc() for debugfs QP dump
This allows dumping thousands of QPs. Log active open failures of interest. Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c18
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c4
2 files changed, 20 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 6ce401abdbd0..55ab284e22f2 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -1413,6 +1413,24 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
1413 return 0; 1413 return 0;
1414 } 1414 }
1415 1415
1416 /*
1417 * Log interesting failures.
1418 */
1419 switch (status) {
1420 case CPL_ERR_CONN_RESET:
1421 case CPL_ERR_CONN_TIMEDOUT:
1422 break;
1423 default:
1424 printk(KERN_INFO MOD "Active open failure - "
1425 "atid %u status %u errno %d %pI4:%u->%pI4:%u\n",
1426 atid, status, status2errno(status),
1427 &ep->com.local_addr.sin_addr.s_addr,
1428 ntohs(ep->com.local_addr.sin_port),
1429 &ep->com.remote_addr.sin_addr.s_addr,
1430 ntohs(ep->com.remote_addr.sin_port));
1431 break;
1432 }
1433
1416 connect_reply_upcall(ep, status2errno(status)); 1434 connect_reply_upcall(ep, status2errno(status));
1417 state_set(&ep->com, DEAD); 1435 state_set(&ep->com, DEAD);
1418 1436
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index bdb398f54a64..854562915413 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -121,7 +121,7 @@ static int qp_release(struct inode *inode, struct file *file)
121 printk(KERN_INFO "%s null qpd?\n", __func__); 121 printk(KERN_INFO "%s null qpd?\n", __func__);
122 return 0; 122 return 0;
123 } 123 }
124 kfree(qpd->buf); 124 vfree(qpd->buf);
125 kfree(qpd); 125 kfree(qpd);
126 return 0; 126 return 0;
127} 127}
@@ -145,7 +145,7 @@ static int qp_open(struct inode *inode, struct file *file)
145 spin_unlock_irq(&qpd->devp->lock); 145 spin_unlock_irq(&qpd->devp->lock);
146 146
147 qpd->bufsize = count * 128; 147 qpd->bufsize = count * 128;
148 qpd->buf = kmalloc(qpd->bufsize, GFP_KERNEL); 148 qpd->buf = vmalloc(qpd->bufsize);
149 if (!qpd->buf) { 149 if (!qpd->buf) {
150 ret = -ENOMEM; 150 ret = -ENOMEM;
151 goto err1; 151 goto err1;