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 daa69c5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 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,6 +141,12 @@ 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)
{
/* prepost recvs only if quota available (recvs were not preposted
* before) */
if (iface->super.rx.srq.quota == 0) {
return;
}

iface->super.rx.srq.available = iface->super.rx.srq.quota;
iface->super.rx.srq.quota = 0;
uct_rc_mlx5_iface_srq_post_recv(iface);
Expand Down

0 comments on commit daa69c5

Please sign in to comment.