@@ -337,11 +337,11 @@ static int check_usnic_config(opal_btl_usnic_module_t *module,
337337 1. num_vfs (i.e., "usNICs") >= num_local_procs (to ensure that
338338 each MPI process will be able to have its own protection
339339 domain), and
340- 2. num_vfs * num_qps_per_vf >= num_local_procs * NUM_CHANNELS
340+ 2. num_qps_per_vf >= NUM_CHANNELS
341341 (to ensure that each MPI process will be able to get the
342342 number of QPs it needs -- we know that every VF will have
343343 the same number of QPs), and
344- 3. num_vfs * num_cqs_per_vf >= num_local_procs * NUM_CHANNELS
344+ 3. num_cqs_per_vf >= NUM_CHANNELS
345345 (to ensure that each MPI process will be able to get the
346346 number of CQs that it needs) */
347347 if (uip -> ui .v1 .ui_num_vf < unlp ) {
@@ -350,19 +350,17 @@ static int check_usnic_config(opal_btl_usnic_module_t *module,
350350 goto error ;
351351 }
352352
353- if (uip -> ui .v1 .ui_num_vf * uip -> ui .v1 .ui_qp_per_vf <
354- unlp * USNIC_NUM_CHANNELS ) {
355- snprintf (str , sizeof (str ), "Not enough WQ/RQ (found %d, need %d)" ,
356- uip -> ui .v1 .ui_num_vf * uip -> ui .v1 .ui_qp_per_vf ,
357- unlp * USNIC_NUM_CHANNELS );
353+ if (uip -> ui .v1 .ui_qp_per_vf < USNIC_NUM_CHANNELS ) {
354+ snprintf (str , sizeof (str ), "Not enough transmit/receive queues per usNIC (found %d, need %d)" ,
355+ uip -> ui .v1 .ui_qp_per_vf ,
356+ USNIC_NUM_CHANNELS );
358357 goto error ;
359358 }
360- if (uip -> ui .v1 .ui_num_vf * uip -> ui .v1 .ui_cq_per_vf <
361- unlp * USNIC_NUM_CHANNELS ) {
359+ if (uip -> ui .v1 .ui_cq_per_vf < USNIC_NUM_CHANNELS ) {
362360 snprintf (str , sizeof (str ),
363- "Not enough CQ per usNIC (found %d, need %d)" ,
364- uip -> ui .v1 .ui_num_vf * uip -> ui . v1 . ui_cq_per_vf ,
365- unlp * USNIC_NUM_CHANNELS );
361+ "Not enough completion queues per usNIC (found %d, need %d)" ,
362+ uip -> ui .v1 .ui_cq_per_vf ,
363+ USNIC_NUM_CHANNELS );
366364 goto error ;
367365 }
368366
0 commit comments