From 26f97c59eaf94efe06a7e1dde914a4ae4fafa727 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 6d6ea1e5009..1e3223ccfa7 100755 --- a/prov/verbs/src/verbs_eq.c +++ b/prov/verbs/src/verbs_eq.c @@ -941,6 +941,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: @@ -971,6 +976,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;