diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2014-07-14 12:04:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-15 19:25:16 -0400 |
commit | 4c2c5763227a14ce111d6f35df708459d2443cc3 (patch) | |
tree | b261cf8eab4279d5a4162b7417e10162eeb2d755 /drivers/infiniband/hw/cxgb4/provider.c | |
parent | 04e10e2164fcfa05e14eff3c2757a5097f11d258 (diff) |
cxgb4/iw_cxgb4: use firmware ord/ird resource limits
Advertise a larger max read queue depth for qps, and gather the resource limits
from fw and use them to avoid exhaustinq all the resources.
Design:
cxgb4:
Obtain the max_ordird_qp and max_ird_adapter device params from FW
at init time and pass them up to the ULDs when they attach. If these
parameters are not available, due to older firmware, then hard-code
the values based on the known values for older firmware.
iw_cxgb4:
Fix the c4iw_query_device() to report these correct values based on
adapter parameters. ibv_query_device() will always return:
max_qp_rd_atom = max_qp_init_rd_atom = min(module_max, max_ordird_qp)
max_res_rd_atom = max_ird_adapter
Bump up the per qp max module option to 32, allowing it to be increased
by the user up to the device max of max_ordird_qp. 32 seems to be
sufficient to maximize throughput for streaming read benchmarks.
Fail connection setup if the negotiated IRD exhausts the available
adapter ird resources. So the driver will track the amount of ird
resource in use and not send an RI_WR/INIT to FW that would reduce the
available ird resources below zero.
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>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/provider.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/provider.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c index 1d41b92caaf5..67c4a6908021 100644 --- a/drivers/infiniband/hw/cxgb4/provider.c +++ b/drivers/infiniband/hw/cxgb4/provider.c | |||
@@ -322,8 +322,10 @@ static int c4iw_query_device(struct ib_device *ibdev, | |||
322 | props->max_qp_wr = dev->rdev.hw_queue.t4_max_qp_depth; | 322 | props->max_qp_wr = dev->rdev.hw_queue.t4_max_qp_depth; |
323 | props->max_sge = T4_MAX_RECV_SGE; | 323 | props->max_sge = T4_MAX_RECV_SGE; |
324 | props->max_sge_rd = 1; | 324 | props->max_sge_rd = 1; |
325 | props->max_qp_rd_atom = c4iw_max_read_depth; | 325 | props->max_res_rd_atom = dev->rdev.lldi.max_ird_adapter; |
326 | props->max_qp_init_rd_atom = c4iw_max_read_depth; | 326 | props->max_qp_rd_atom = min(dev->rdev.lldi.max_ordird_qp, |
327 | c4iw_max_read_depth); | ||
328 | props->max_qp_init_rd_atom = props->max_qp_rd_atom; | ||
327 | props->max_cq = T4_MAX_NUM_CQ; | 329 | props->max_cq = T4_MAX_NUM_CQ; |
328 | props->max_cqe = dev->rdev.hw_queue.t4_max_cq_depth; | 330 | props->max_cqe = dev->rdev.hw_queue.t4_max_cq_depth; |
329 | props->max_mr = c4iw_num_stags(&dev->rdev); | 331 | props->max_mr = c4iw_num_stags(&dev->rdev); |