Commit a53d77a3 authored by Devesh Sharma's avatar Devesh Sharma Committed by Roland Dreier

RDMA/ocrdma: Remove hardcoding of the max DPP QPs supported

Removing hardcoded value of max dpp qps and calculate the same from
doorbell page size and WQE size.
Signed-off-by: default avatarDevesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent efe45937
...@@ -1236,7 +1236,6 @@ struct ocrdma_destroy_srq { ...@@ -1236,7 +1236,6 @@ struct ocrdma_destroy_srq {
enum { enum {
OCRDMA_ALLOC_PD_ENABLE_DPP = BIT(16), OCRDMA_ALLOC_PD_ENABLE_DPP = BIT(16),
OCRDMA_PD_MAX_DPP_ENABLED_QP = 8,
OCRDMA_DPP_PAGE_SIZE = 4096 OCRDMA_DPP_PAGE_SIZE = 4096
}; };
......
...@@ -268,7 +268,8 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev, ...@@ -268,7 +268,8 @@ static struct ocrdma_pd *_ocrdma_alloc_pd(struct ocrdma_dev *dev,
pd->dpp_enabled = pd->dpp_enabled =
ocrdma_get_asic_type(dev) == OCRDMA_ASIC_GEN_SKH_R; ocrdma_get_asic_type(dev) == OCRDMA_ASIC_GEN_SKH_R;
pd->num_dpp_qp = pd->num_dpp_qp =
pd->dpp_enabled ? OCRDMA_PD_MAX_DPP_ENABLED_QP : 0; pd->dpp_enabled ? (dev->nic_info.db_page_size /
dev->attr.wqe_size) : 0;
} }
retry: retry:
......
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