From 34d861dfe9f147f42e5d0e33798fc0fe488f3718 Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Wed, 20 Jan 2016 12:08:00 +0200 Subject: [PATCH] orte/oob: Fix issue #1301 Signed-off-by: Igor Ivanov --- orte/mca/oob/ud/oob_ud_qp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/orte/mca/oob/ud/oob_ud_qp.c b/orte/mca/oob/ud/oob_ud_qp.c index 4718a3b569..1fde08c4fa 100644 --- a/orte/mca/oob/ud/oob_ud_qp.c +++ b/orte/mca/oob/ud/oob_ud_qp.c @@ -40,6 +40,7 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port, struct ibv_comp_channel *send_channel, bool onecq) { struct ibv_qp_init_attr init_attr; + int max_cqe = min(port->device->attr.max_cqe, 16384); opal_output_verbose(10, orte_oob_base_framework.framework_output, "%s oob:ud:qp_init creating UD QP on port %d", @@ -50,20 +51,19 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port, init_attr.qp_type = IBV_QPT_UD; - int cqe = 16384; - qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, cqe, + qp->ib_recv_cq = ibv_create_cq (port->device->ib_context, max_cqe, port, recv_channel, 0); if (NULL == qp->ib_recv_cq) { orte_show_help("help-oob-ud.txt", "create-cq-failed", true, - orte_process_info.nodename, cqe, strerror(errno)); + orte_process_info.nodename, max_cqe, strerror(errno)); return ORTE_ERROR; } if (false == onecq) { - qp->ib_send_cq = ibv_create_cq (port->device->ib_context, cqe, + qp->ib_send_cq = ibv_create_cq (port->device->ib_context, max_cqe, port, send_channel, 0); if (NULL == qp->ib_send_cq) { orte_show_help("help-oob-ud.txt", "create-cq-failed", true, - orte_process_info.nodename, cqe, strerror(errno)); + orte_process_info.nodename, max_cqe, strerror(errno)); return ORTE_ERROR; } } else {