Skip to content

Commit e311e37

Browse files
committed
UCT: fix CI
1 parent b77886a commit e311e37

3 files changed

Lines changed: 24 additions & 49 deletions

File tree

src/ucp/core/ucp_worker.c

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -492,44 +492,42 @@ static ucs_status_t
492492
ucp_worker_iface_handle_uct_ep_failure(ucp_ep_h ucp_ep, ucp_lane_index_t lane,
493493
uct_ep_h uct_ep, ucs_status_t ep_status)
494494
{
495-
ucp_wireup_ep_t *wireup_ep;
496495
ucs_status_t status = UCS_OK;
496+
ucp_wireup_ep_t *wireup_ep;
497497
int ft_available;
498498

499499
ft_available = ucp_worker_iface_ft_available(ucp_ep, uct_ep);
500-
if (ucp_ep->flags & UCP_EP_FLAG_FAILED) {
501-
if (!ft_available) {
500+
if (!ft_available) {
501+
status = ucp_worker_uct_ep_outstanding_purge(uct_ep, ep_status);
502+
} else {
503+
status = uct_ep_invalidate(uct_ep, NULL);
504+
if (status != UCS_OK) {
505+
ucs_error("failed to invalidate UCT EP %p: %s", uct_ep,
506+
ucs_status_string(status));
502507
status = ucp_worker_uct_ep_outstanding_purge(uct_ep, ep_status);
503508
}
509+
}
504510

511+
if (ucp_ep->flags & UCP_EP_FLAG_FAILED) {
505512
/* No pending operations should be scheduled */
506513
uct_ep_pending_purge(uct_ep, ucp_destroyed_ep_pending_purge, ucp_ep);
507514
return status;
508515
}
509516

510-
if (ft_available) {
511-
status = uct_ep_invalidate(uct_ep, NULL);
512-
if (status != UCS_OK) {
513-
ucs_error("failed to invalidate UCT EP %p: %s", uct_ep,
514-
ucs_status_string(status));
515-
return status;
516-
}
517-
}
518-
519517
wireup_ep = ucp_wireup_ep(ucp_ep_get_lane(ucp_ep, lane));
520518
if ((wireup_ep == NULL) ||
521519
!ucp_wireup_aux_ep_is_owner(wireup_ep, uct_ep) ||
522520
!ucp_ep_is_local_connected(ucp_ep)) {
523521
/* Failure on NON-AUX EP or failure on AUX EP before it sent its address
524522
* means failure on the UCP EP */
525523
ucp_ep_set_lanes_failed(ucp_ep, UCS_BIT(lane), ep_status);
526-
goto out;
524+
return status;
527525
}
528526

529527
if (wireup_ep->flags & UCP_WIREUP_EP_FLAG_READY) {
530528
/* @ref ucp_wireup_ep_progress was scheduled, wireup ep and its
531529
* pending requests have to be handled there */
532-
goto out;
530+
return status;
533531
}
534532

535533
/**
@@ -541,12 +539,6 @@ ucp_worker_iface_handle_uct_ep_failure(ucp_ep_h ucp_ep, ucp_lane_index_t lane,
541539
ucp_wireup_ep_discard_aux_ep(wireup_ep, UCT_FLUSH_FLAG_CANCEL,
542540
ucp_destroyed_ep_pending_purge, ucp_ep);
543541
ucp_wireup_remote_connected(ucp_ep);
544-
545-
out:
546-
if (!ft_available) {
547-
status = ucp_worker_uct_ep_outstanding_purge(uct_ep, ep_status);
548-
}
549-
550542
return status;
551543
}
552544

@@ -606,8 +598,9 @@ ucp_worker_iface_error_handler(void *arg, uct_ep_h uct_ep, ucs_status_t status)
606598
if (ucp_worker_is_uct_ep_discarding(worker, uct_ep)) {
607599
ucs_debug("UCT EP %p is being discarded on UCP Worker %p",
608600
uct_ep, worker);
609-
status = ucp_worker_uct_ep_outstanding_purge(uct_ep, status);
601+
(void)ucp_worker_uct_ep_outstanding_purge(uct_ep, status);
610602
ucp_discard_lane_ff(uct_ep);
603+
status = UCS_OK;
611604
goto out;
612605
}
613606

src/uct/ib/mlx5/rc/rc_mlx5_ep.c

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -807,31 +807,18 @@ ucs_status_t uct_rc_mlx5_base_ep_invalidate(uct_ep_h tl_ep,
807807
{
808808
UCT_RC_MLX5_BASE_EP_DECL(tl_ep, iface, ep);
809809
uct_ib_mlx5_txwq_t *txwq = &ep->tx.wq;
810-
uint16_t ft_ci = txwq->ft_ci;
810+
uint16_t ft_ci = txwq->ft_ci;
811811
uint16_t outstanding;
812-
int failover_arm;
813-
ucs_status_t status;
814812

815-
failover_arm = !(ep->super.ext_flags &
816-
UCT_RC_EP_EXT_FLAG_FAILOVER_ARMED);
817-
if (failover_arm) {
813+
if (!(ep->super.ext_flags & UCT_RC_EP_EXT_FLAG_FAILOVER_ARMED)) {
818814
outstanding = txwq->bb_max - uct_rc_txqp_available(&ep->super.txqp);
819-
ft_ci = txwq->prev_sw_pi - outstanding;
815+
txwq->ft_ci = txwq->prev_sw_pi - outstanding;
816+
ep->super.ext_flags |= UCT_RC_EP_EXT_FLAG_FAILOVER_ARMED;
820817
ucs_assert(ft_ci == txwq->hw_ci);
821818
}
822819

823-
status = uct_ib_mlx5_modify_qp_state(&iface->super.super, &txwq->super,
824-
IBV_QPS_ERR);
825-
if ((status != UCS_OK) || !failover_arm) {
826-
return status;
827-
}
828-
829-
txwq->ft_ci = ft_ci;
830-
ep->super.ext_flags |= UCT_RC_EP_EXT_FLAG_FAILOVER_ARMED;
831-
832-
ucs_debug("ep %p armed failover WQE range (%u, %u) posted index %u", ep,
833-
txwq->ft_ci, txwq->sw_pi, txwq->nnop_pi);
834-
return UCS_OK;
820+
return uct_ib_mlx5_modify_qp_state(&iface->super.super, &txwq->super,
821+
IBV_QPS_ERR);
835822
}
836823

837824
ucs_status_t uct_rc_mlx5_base_ep_fc_ctrl(uct_ep_t *tl_ep, unsigned op,

src/uct/ib/mlx5/rc/rc_mlx5_iface.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ void uct_rc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, void *arg,
206206
}
207207

208208
base_iface = ucs_derived_of(&iface->super.super.super, uct_base_iface_t);
209-
if (base_iface->err_handler == NULL) {
209+
is_flush_cancel = ep->super.flags & UCT_RC_EP_FLAG_FLUSH_CANCEL;
210+
if ((base_iface->err_handler == NULL) || is_flush_cancel) {
210211
uct_rc_txqp_purge_outstanding(iface, &ep->super.txqp, ep_status, pi, 0);
211212
}
212213

@@ -219,20 +220,14 @@ void uct_rc_mlx5_iface_handle_failure(uct_ib_iface_t *ib_iface, void *arg,
219220
goto out;
220221
}
221222

222-
is_flush_cancel = ep->super.flags & UCT_RC_EP_FLAG_FLUSH_CANCEL;
223223
ep->super.flags |= UCT_RC_EP_FLAG_ERR_HANDLER_INVOKED;
224-
uct_rc_fc_restore_wnd(iface, &ep->super.fc);
225-
226-
if (is_flush_cancel && (base_iface->err_handler == NULL)) {
224+
if (is_flush_cancel) {
227225
goto out;
228226
}
229227

228+
uct_rc_fc_restore_wnd(iface, &ep->super.fc);
230229
status = uct_iface_handle_ep_err(&iface->super.super.super,
231230
&ep->super.super.super, ep_status);
232-
if (is_flush_cancel) {
233-
goto out;
234-
}
235-
236231
log_lvl = uct_base_iface_failure_log_level(&ib_iface->super, status,
237232
ep_status);
238233

0 commit comments

Comments
 (0)