Skip to content

Commit

Permalink
UCT/IB: Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrygx committed Dec 16, 2020
1 parent 7c81ab1 commit a6f32d4
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/uct/ib/mlx5/ib_mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,18 +814,16 @@ uct_ib_mlx5_iface_select_sl(uct_ib_iface_t *iface,
#endif
uint16_t ooo_sl_mask = 0;
ucs_status_t status;
ucs_ternary_auto_value_t ar_enable;
int have_ooo_sl_mask;

ucs_assert(iface->config.sl == UCT_IB_SL_NUM);

if (uct_ib_device_is_port_roce(uct_ib_iface_device(iface),
iface->config.port_num)) {
/* Ethernet priority for RoCE devices can't be selected regardless
* AR support requested by user, pass empty ooo_sl_mask */
ar_enable = UCS_NO;
have_ooo_sl_mask = 1;
goto select_sl;
return uct_ib_mlx5_select_sl(ib_config, UCS_NO, 0, 1,
UCT_IB_IFACE_ARG(iface),
&iface->config.sl);
}

#if HAVE_DEVX
Expand All @@ -838,11 +836,8 @@ uct_ib_mlx5_iface_select_sl(uct_ib_iface_t *iface,
status = UCS_ERR_UNSUPPORTED;
#endif

ar_enable = ib_mlx5_config->ar_enable;
have_ooo_sl_mask = status == UCS_OK;

select_sl:
return uct_ib_mlx5_select_sl(ib_config, ar_enable, ooo_sl_mask,
have_ooo_sl_mask, UCT_IB_IFACE_ARG(iface),
return uct_ib_mlx5_select_sl(ib_config, ib_mlx5_config->ar_enable,
ooo_sl_mask, status == UCS_OK,
UCT_IB_IFACE_ARG(iface),
&iface->config.sl);
}

0 comments on commit a6f32d4

Please sign in to comment.