Skip to content

Commit 5db80cf

Browse files
UCP/DEVICE: Skip error logging for UCS_ERR_NOT_CONNECTED (#10978)
1 parent 1be106e commit 5db80cf

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/ucp/api/device/ucp_host.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ typedef struct ucp_device_mem_list_params {
149149
* @param [out] handle Created descriptor list handle.
150150
*
151151
* @return Error code as defined by @ref ucs_status_t.
152+
* @retval UCS_ERR_NOT_CONNECTED if the endpoint is not connected yet.
153+
* The caller should retry after calling @ref ucp_worker_progress.
152154
*/
153155
ucs_status_t
154156
ucp_device_mem_list_create(ucp_ep_h ep,

src/ucp/core/ucp_device.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ ucp_device_mem_list_create(ucp_ep_h ep,
419419
uct_allocated_memory_t mem;
420420

421421
if (!(ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED)) {
422+
/*
423+
* Do not log error here because UCS_ERR_NOT_CONNECTED is expected
424+
* during connection establishment. Applications are expected to retry
425+
* with progress.
426+
*/
422427
return UCS_ERR_NOT_CONNECTED;
423428
}
424429

@@ -457,7 +462,14 @@ ucp_device_mem_list_create(ucp_ep_h ep,
457462
status = ucp_device_mem_list_create_handle(ep, local_sys_dev, params, lanes,
458463
ep_config, mem_type, &mem);
459464
if (status != UCS_OK) {
460-
ucs_error("failed to create handle: %s", ucs_status_string(status));
465+
/*
466+
* Do not log error for UCS_ERR_NOT_CONNECTED because it is expected
467+
* during connection establishment. Applications are expected to retry
468+
* with progress.
469+
*/
470+
if (status != UCS_ERR_NOT_CONNECTED) {
471+
ucs_error("failed to create handle: %s", ucs_status_string(status));
472+
}
461473
return status;
462474
}
463475

0 commit comments

Comments
 (0)