iw_cxgb4: Support query_qp() verb
authorHariprasad Shenai <hariprasad@chelsio.com>
Mon, 21 Jul 2014 15:25:14 +0000 (20:55 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jul 2014 03:23:59 +0000 (20:23 -0700)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/cxgb4/qp.c

index fd66bd9a9db0be726b3af520b122ac4399720df9..0e7e0e30fba4dd6dc8b0882dab053988c8ae6b41 100644 (file)
@@ -1856,5 +1856,11 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
        memset(attr, 0, sizeof *attr);
        memset(init_attr, 0, sizeof *init_attr);
        attr->qp_state = to_ib_qp_state(qhp->attr.state);
+       init_attr->cap.max_send_wr = qhp->attr.sq_num_entries;
+       init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries;
+       init_attr->cap.max_send_sge = qhp->attr.sq_max_sges;
+       init_attr->cap.max_recv_sge = qhp->attr.sq_max_sges;
+       init_attr->cap.max_inline_data = T4_MAX_SEND_INLINE;
+       init_attr->sq_sig_type = qhp->sq_sig_all ? IB_SIGNAL_ALL_WR : 0;
        return 0;
 }