Skip to content

Commit

Permalink
UCT/IB/DC: Fix managing FC_HARD_REQ resend time
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrygx committed Jun 3, 2022
1 parent 43f710a commit a6c5a47
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/uct/ib/dc/dc_mlx5_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,13 @@ void uct_dc_mlx5_ep_pending_purge(uct_ep_h tl_ep,
}
}

unsigned uct_dc_mlx5_ep_fc_hard_req_progress(void *arg)
static void uct_dc_mlx5_ep_fc_hard_req_init_resend(uct_dc_mlx5_iface_t *iface,
ucs_time_t now)
{
iface->tx.fc_hard_req_resend_time = now + iface->tx.fc_hard_req_timeout;
}

static unsigned uct_dc_mlx5_ep_fc_hard_req_progress(void *arg)
{
uct_dc_mlx5_iface_t *iface = arg;
ucs_time_t now = ucs_get_time();
Expand All @@ -1503,6 +1509,8 @@ unsigned uct_dc_mlx5_ep_fc_hard_req_progress(void *arg)
return 0;
}

uct_dc_mlx5_ep_fc_hard_req_init_resend(iface, now);

/* Go over all endpoints that are waiting for FC window being restored and
* resend FC_HARD_REQ packet to make sure a peer will resend FC_PURE_GRANT
* packet in case of failure on the remote FC endpoint */
Expand Down Expand Up @@ -1567,6 +1575,10 @@ ucs_status_t uct_dc_mlx5_ep_check_fc(uct_dc_mlx5_iface_t *iface,
goto out;
}

if (iface->tx.fc_hard_req_progress_cb_id == UCS_CALLBACKQ_ID_NULL) {
uct_dc_mlx5_ep_fc_hard_req_init_resend(iface, now);
}

uct_worker_progress_register_safe(
&iface->super.super.super.super.worker->super,
uct_dc_mlx5_ep_fc_hard_req_progress, iface,
Expand Down

0 comments on commit a6c5a47

Please sign in to comment.