aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/verbs.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2015-01-21 11:03:35 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2015-01-30 10:47:48 -0500
commitce1ab9ab47973dcff7548abda20e49add2c4ca95 (patch)
treea10f985b153136992204b307d890159471379a55 /net/sunrpc/xprtrdma/verbs.c
parent7bc7972cdd1f137552ca979caa11c8acbe119ae8 (diff)
xprtrdma: Take struct ib_qp_attr and ib_qp_init_attr off the stack
Reduce stack footprint of the connection upcall handler function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/verbs.c')
-rw-r--r--net/sunrpc/xprtrdma/verbs.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 123bb04dd823..958b372cb919 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -425,8 +425,8 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event)
425#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) 425#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
426 struct sockaddr_in *addr = (struct sockaddr_in *) &ep->rep_remote_addr; 426 struct sockaddr_in *addr = (struct sockaddr_in *) &ep->rep_remote_addr;
427#endif 427#endif
428 struct ib_qp_attr attr; 428 struct ib_qp_attr *attr = &ia->ri_qp_attr;
429 struct ib_qp_init_attr iattr; 429 struct ib_qp_init_attr *iattr = &ia->ri_qp_init_attr;
430 int connstate = 0; 430 int connstate = 0;
431 431
432 switch (event->event) { 432 switch (event->event) {
@@ -449,12 +449,13 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event)
449 break; 449 break;
450 case RDMA_CM_EVENT_ESTABLISHED: 450 case RDMA_CM_EVENT_ESTABLISHED:
451 connstate = 1; 451 connstate = 1;
452 ib_query_qp(ia->ri_id->qp, &attr, 452 ib_query_qp(ia->ri_id->qp, attr,
453 IB_QP_MAX_QP_RD_ATOMIC | IB_QP_MAX_DEST_RD_ATOMIC, 453 IB_QP_MAX_QP_RD_ATOMIC | IB_QP_MAX_DEST_RD_ATOMIC,
454 &iattr); 454 iattr);
455 dprintk("RPC: %s: %d responder resources" 455 dprintk("RPC: %s: %d responder resources"
456 " (%d initiator)\n", 456 " (%d initiator)\n",
457 __func__, attr.max_dest_rd_atomic, attr.max_rd_atomic); 457 __func__, attr->max_dest_rd_atomic,
458 attr->max_rd_atomic);
458 goto connected; 459 goto connected;
459 case RDMA_CM_EVENT_CONNECT_ERROR: 460 case RDMA_CM_EVENT_CONNECT_ERROR:
460 connstate = -ENOTCONN; 461 connstate = -ENOTCONN;
@@ -487,7 +488,7 @@ connected:
487 488
488#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) 489#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
489 if (connstate == 1) { 490 if (connstate == 1) {
490 int ird = attr.max_dest_rd_atomic; 491 int ird = attr->max_dest_rd_atomic;
491 int tird = ep->rep_remote_cma.responder_resources; 492 int tird = ep->rep_remote_cma.responder_resources;
492 printk(KERN_INFO "rpcrdma: connection to %pI4:%u " 493 printk(KERN_INFO "rpcrdma: connection to %pI4:%u "
493 "on %s, memreg %d slots %d ird %d%s\n", 494 "on %s, memreg %d slots %d ird %d%s\n",