Skip to content

Commit

Permalink
Merge pull request #7219 from brminich/uct/error_too_big_seg
Browse files Browse the repository at this point in the history
UCT/RCX/DC: Do not allow to set invalid IB segment size
  • Loading branch information
brminich authored Aug 13, 2021
2 parents 1dcbf01 + f072619 commit 4eb31aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/uct/ib/rc/accel/rc_mlx5_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,12 @@ UCS_CLASS_INIT_FUNC(uct_rc_mlx5_iface_common_t, uct_iface_ops_t *tl_ops,
uct_ib_device_t *dev;
ucs_status_t status;

if (rc_config->super.seg_size > UCT_IB_MLX5_MP_RQ_BYTE_CNT_MASK) {
ucs_error("IB segment size is too big %ld, it must not exceed %d",
rc_config->super.seg_size, UCT_IB_MLX5_MP_RQ_BYTE_CNT_MASK);
return UCS_ERR_INVALID_PARAM;
}

status = uct_rc_mlx5_iface_preinit(self, tl_md, rc_config, mlx5_config,
params, init_attr);
if (status != UCS_OK) {
Expand Down

0 comments on commit 4eb31aa

Please sign in to comment.