Commit d716a2a0 authored by Vipul Pandya's avatar Vipul Pandya Committed by Roland Dreier

RDMA/cxgb4: Use vmalloc() for debugfs QP dump

This allows dumping thousands of QPs.  Log active open failures of
interest.
Signed-off-by: default avatarVipul Pandya <vipul@chelsio.com>
Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 422eea0a
...@@ -1413,6 +1413,24 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) ...@@ -1413,6 +1413,24 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
return 0; return 0;
} }
/*
* Log interesting failures.
*/
switch (status) {
case CPL_ERR_CONN_RESET:
case CPL_ERR_CONN_TIMEDOUT:
break;
default:
printk(KERN_INFO MOD "Active open failure - "
"atid %u status %u errno %d %pI4:%u->%pI4:%u\n",
atid, status, status2errno(status),
&ep->com.local_addr.sin_addr.s_addr,
ntohs(ep->com.local_addr.sin_port),
&ep->com.remote_addr.sin_addr.s_addr,
ntohs(ep->com.remote_addr.sin_port));
break;
}
connect_reply_upcall(ep, status2errno(status)); connect_reply_upcall(ep, status2errno(status));
state_set(&ep->com, DEAD); state_set(&ep->com, DEAD);
......
...@@ -121,7 +121,7 @@ static int qp_release(struct inode *inode, struct file *file) ...@@ -121,7 +121,7 @@ static int qp_release(struct inode *inode, struct file *file)
printk(KERN_INFO "%s null qpd?\n", __func__); printk(KERN_INFO "%s null qpd?\n", __func__);
return 0; return 0;
} }
kfree(qpd->buf); vfree(qpd->buf);
kfree(qpd); kfree(qpd);
return 0; return 0;
} }
...@@ -145,7 +145,7 @@ static int qp_open(struct inode *inode, struct file *file) ...@@ -145,7 +145,7 @@ static int qp_open(struct inode *inode, struct file *file)
spin_unlock_irq(&qpd->devp->lock); spin_unlock_irq(&qpd->devp->lock);
qpd->bufsize = count * 128; qpd->bufsize = count * 128;
qpd->buf = kmalloc(qpd->bufsize, GFP_KERNEL); qpd->buf = vmalloc(qpd->bufsize);
if (!qpd->buf) { if (!qpd->buf) {
ret = -ENOMEM; ret = -ENOMEM;
goto err1; goto err1;
......
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