diff options
author | Naresh Gottumukkala <bgottumukkala@emulex.com> | 2013-08-26 05:57:46 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-09-03 00:18:42 -0400 |
commit | c43e9ab84d853f499a2fd531362973c8e505b342 (patch) | |
tree | 5ca8f776c02a41eba03849a616e87e535896e706 /drivers/infiniband | |
parent | cffce99051b80c90630a9fff662a1b25e278069d (diff) |
RDMA/ocrdma: Increase STAG array size
1) Increase STAG Array size.
2) Max inline data size should be set to the same value
used during QP creation
3) Set max_sge_rd to zero since we dont support RD transport in our adapters.
4) Max cqes reported in ibv_devinfo should be from QUERY_CONFIG.
Signed-off-by: Naresh Gottumukkala <bgottumukkala@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c index 618c2124e619..3f027552a1a1 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c | |||
@@ -994,6 +994,9 @@ static void ocrdma_get_attr(struct ocrdma_dev *dev, | |||
994 | attr->max_num_mr_pbl = rsp->max_num_mr_pbl; | 994 | attr->max_num_mr_pbl = rsp->max_num_mr_pbl; |
995 | attr->max_cqe = rsp->max_cq_cqes_per_cq & | 995 | attr->max_cqe = rsp->max_cq_cqes_per_cq & |
996 | OCRDMA_MBX_QUERY_CFG_MAX_CQES_PER_CQ_MASK; | 996 | OCRDMA_MBX_QUERY_CFG_MAX_CQES_PER_CQ_MASK; |
997 | attr->max_cq = (rsp->max_cq_cqes_per_cq & | ||
998 | OCRDMA_MBX_QUERY_CFG_MAX_CQ_MASK) >> | ||
999 | OCRDMA_MBX_QUERY_CFG_MAX_CQ_OFFSET; | ||
997 | attr->wqe_size = ((rsp->wqe_rqe_stride_max_dpp_cqs & | 1000 | attr->wqe_size = ((rsp->wqe_rqe_stride_max_dpp_cqs & |
998 | OCRDMA_MBX_QUERY_CFG_MAX_WQE_SIZE_MASK) >> | 1001 | OCRDMA_MBX_QUERY_CFG_MAX_WQE_SIZE_MASK) >> |
999 | OCRDMA_MBX_QUERY_CFG_MAX_WQE_SIZE_OFFSET) * | 1002 | OCRDMA_MBX_QUERY_CFG_MAX_WQE_SIZE_OFFSET) * |
@@ -1026,7 +1029,6 @@ static int ocrdma_check_fw_config(struct ocrdma_dev *dev, | |||
1026 | return -EINVAL; | 1029 | return -EINVAL; |
1027 | dev->base_eqid = conf->base_eqid; | 1030 | dev->base_eqid = conf->base_eqid; |
1028 | dev->max_eq = conf->max_eq; | 1031 | dev->max_eq = conf->max_eq; |
1029 | dev->attr.max_cq = OCRDMA_MAX_CQ - 1; | ||
1030 | return 0; | 1032 | return 0; |
1031 | } | 1033 | } |
1032 | 1034 | ||
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h index 1e2992fee4be..35c61080ae1e 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h | |||
@@ -91,7 +91,7 @@ enum { | |||
91 | 91 | ||
92 | #define OCRDMA_MAX_QP 2048 | 92 | #define OCRDMA_MAX_QP 2048 |
93 | #define OCRDMA_MAX_CQ 2048 | 93 | #define OCRDMA_MAX_CQ 2048 |
94 | #define OCRDMA_MAX_STAG 2048 | 94 | #define OCRDMA_MAX_STAG 8192 |
95 | 95 | ||
96 | enum { | 96 | enum { |
97 | OCRDMA_DB_RQ_OFFSET = 0xE0, | 97 | OCRDMA_DB_RQ_OFFSET = 0xE0, |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index e554fc258a68..e934073e7052 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -85,7 +85,7 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr) | |||
85 | IB_DEVICE_LOCAL_DMA_LKEY | | 85 | IB_DEVICE_LOCAL_DMA_LKEY | |
86 | IB_DEVICE_MEM_MGT_EXTENSIONS; | 86 | IB_DEVICE_MEM_MGT_EXTENSIONS; |
87 | attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge); | 87 | attr->max_sge = min(dev->attr.max_send_sge, dev->attr.max_srq_sge); |
88 | attr->max_sge_rd = dev->attr.max_rdma_sge; | 88 | attr->max_sge_rd = 0; |
89 | attr->max_cq = dev->attr.max_cq; | 89 | attr->max_cq = dev->attr.max_cq; |
90 | attr->max_cqe = dev->attr.max_cqe; | 90 | attr->max_cqe = dev->attr.max_cqe; |
91 | attr->max_mr = dev->attr.max_mr; | 91 | attr->max_mr = dev->attr.max_mr; |
@@ -1365,7 +1365,7 @@ int ocrdma_query_qp(struct ib_qp *ibqp, | |||
1365 | qp_attr->cap.max_recv_wr = qp->rq.max_cnt - 1; | 1365 | qp_attr->cap.max_recv_wr = qp->rq.max_cnt - 1; |
1366 | qp_attr->cap.max_send_sge = qp->sq.max_sges; | 1366 | qp_attr->cap.max_send_sge = qp->sq.max_sges; |
1367 | qp_attr->cap.max_recv_sge = qp->rq.max_sges; | 1367 | qp_attr->cap.max_recv_sge = qp->rq.max_sges; |
1368 | qp_attr->cap.max_inline_data = dev->attr.max_inline_data; | 1368 | qp_attr->cap.max_inline_data = qp->max_inline_data; |
1369 | qp_init_attr->cap = qp_attr->cap; | 1369 | qp_init_attr->cap = qp_attr->cap; |
1370 | memcpy(&qp_attr->ah_attr.grh.dgid, ¶ms.dgid[0], | 1370 | memcpy(&qp_attr->ah_attr.grh.dgid, ¶ms.dgid[0], |
1371 | sizeof(params.dgid)); | 1371 | sizeof(params.dgid)); |