Skip to content

Commit

Permalink
RC_MLX5/IFACE: fixed assert
Browse files Browse the repository at this point in the history
- fixed issue in iface recv prepost when adaptive routing enabled
- fixed assert: rc_mlx5_common.c:128  Assertion `rc_iface->rx.srq.available >= count' failed
- don't try prepost recv twice
  • Loading branch information
Sergey Oblomov committed Dec 18, 2020
1 parent a58c494 commit 1e5e1d8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/uct/ib/rc/accel/rc_mlx5_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_mlx5_iface_common_t *iface)
sizeof(struct mlx5_wqe_srq_next_seg));

ucs_assert(UCS_CIRCULAR_COMPARE16(srq->ready_idx, <=, srq->free_idx));
ucs_assert(rc_iface->rx.srq.available > 0);

wqe_index = srq->ready_idx;
for (;;) {
Expand Down Expand Up @@ -140,9 +141,13 @@ unsigned uct_rc_mlx5_iface_srq_post_recv(uct_rc_mlx5_iface_common_t *iface)

void uct_rc_mlx5_iface_common_prepost_recvs(uct_rc_mlx5_iface_common_t *iface)
{
iface->super.rx.srq.available = iface->super.rx.srq.quota;
iface->super.rx.srq.quota = 0;
uct_rc_mlx5_iface_srq_post_recv(iface);
/* prepost recvs only if quota available
* (recvs were not preposted before) */
if (iface->super.rx.srq.quota > 0) {
iface->super.rx.srq.available = iface->super.rx.srq.quota;
iface->super.rx.srq.quota = 0;
uct_rc_mlx5_iface_srq_post_recv(iface);
}
}

#define UCT_RC_MLX5_DEFINE_ATOMIC_LE_HANDLER(_bits) \
Expand Down

0 comments on commit 1e5e1d8

Please sign in to comment.