From bf1ed58c747b0c6078f9356ad4d1ce754cd76a09 Mon Sep 17 00:00:00 2001 From: Sylvain Didelot Date: Wed, 15 Nov 2023 13:03:38 +0000 Subject: [PATCH] prov/verbs: Report EQ error when connection establishment fails Fix two code paths where some connection establishment may fail and we don't report the error to the EQ. Signed-off-by: Sylvain Didelot --- prov/verbs/src/verbs_eq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/prov/verbs/src/verbs_eq.c b/prov/verbs/src/verbs_eq.c index cd90c28a429..8150568d77b 100755 --- a/prov/verbs/src/verbs_eq.c +++ b/prov/verbs/src/verbs_eq.c @@ -940,6 +940,11 @@ vrb_eq_cm_process_event(struct vrb_eq *eq, ofi_genlock_lock(&vrb_ep2_progress(ep)->ep_lock); ret = vrb_eq_addr_resolved_event(ep); ofi_genlock_unlock(&vrb_ep2_progress(ep)->ep_lock); + if (ret != -FI_EAGAIN) { + eq->err.err = -ret; + eq->err.prov_errno = ret; + goto err; + } goto ack; case RDMA_CM_EVENT_ROUTE_RESOLVED: @@ -969,6 +974,11 @@ vrb_eq_cm_process_event(struct vrb_eq *eq, ret = -FI_EAGAIN; } ofi_genlock_unlock(&vrb_ep2_progress(ep)->ep_lock); + if (ret != -FI_EAGAIN) { + eq->err.err = -ret; + eq->err.prov_errno = ret; + goto err; + } goto ack; case RDMA_CM_EVENT_CONNECT_REQUEST: *event = FI_CONNREQ;