@@ -40,6 +40,7 @@ int mca_oob_ud_qp_init (mca_oob_ud_qp_t *qp, struct mca_oob_ud_port_t *port,
40
40
struct ibv_comp_channel * send_channel , bool onecq )
41
41
{
42
42
struct ibv_qp_init_attr init_attr ;
43
+ int max_cqe = min (port -> device -> attr .max_cqe , 16384 );
43
44
44
45
opal_output_verbose (10 , orte_oob_base_framework .framework_output ,
45
46
"%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,
50
51
51
52
init_attr .qp_type = IBV_QPT_UD ;
52
53
53
- int cqe = 16384 ;
54
- qp -> ib_recv_cq = ibv_create_cq (port -> device -> ib_context , cqe ,
54
+ qp -> ib_recv_cq = ibv_create_cq (port -> device -> ib_context , max_cqe ,
55
55
port , recv_channel , 0 );
56
56
if (NULL == qp -> ib_recv_cq ) {
57
57
orte_show_help ("help-oob-ud.txt" , "create-cq-failed" , true,
58
- orte_process_info .nodename , cqe , strerror (errno ));
58
+ orte_process_info .nodename , max_cqe , strerror (errno ));
59
59
return ORTE_ERROR ;
60
60
}
61
61
if (false == onecq ) {
62
- qp -> ib_send_cq = ibv_create_cq (port -> device -> ib_context , cqe ,
62
+ qp -> ib_send_cq = ibv_create_cq (port -> device -> ib_context , max_cqe ,
63
63
port , send_channel , 0 );
64
64
if (NULL == qp -> ib_send_cq ) {
65
65
orte_show_help ("help-oob-ud.txt" , "create-cq-failed" , true,
66
- orte_process_info .nodename , cqe , strerror (errno ));
66
+ orte_process_info .nodename , max_cqe , strerror (errno ));
67
67
return ORTE_ERROR ;
68
68
}
69
69
} else {
0 commit comments