Skip to content

Commit

Permalink
Merge pull request openucx#6024 from alinask/topic/uct-rdmacm-enhance…
Browse files Browse the repository at this point in the history
…-reject-error

IB/RDMACM: Add local and remote addresses to the reject error message.
  • Loading branch information
yosefe authored Dec 13, 2020
2 parents 392443a + 61beb70 commit 6f9a989
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/uct/ib/rdmacm/rdmacm_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ ucs_status_t uct_rdmacm_cm_ack_event(struct rdma_cm_event *event)
ucs_status_t uct_rdmacm_cm_reject(struct rdma_cm_id *id)
{
uct_rdmacm_priv_data_hdr_t hdr;
char remote_ip_port_str[UCS_SOCKADDR_STRING_LEN];
char local_ip_port_str[UCS_SOCKADDR_STRING_LEN];

hdr.length = 0;
hdr.status = (uint8_t)UCS_ERR_REJECTED;

ucs_trace("reject on cm_id %p", id);

if (rdma_reject(id, &hdr, sizeof(hdr))) {
ucs_error("rdma_reject (id=%p) failed with error: %m", id);
ucs_error("rdma_reject (id=%p local addr=%s remote addr=%s) failed "
"with error: %m", id,
ucs_sockaddr_str(rdma_get_local_addr(id), local_ip_port_str,
UCS_SOCKADDR_STRING_LEN),
ucs_sockaddr_str(rdma_get_peer_addr(id), remote_ip_port_str,
UCS_SOCKADDR_STRING_LEN));
return UCS_ERR_IO_ERROR;
}

Expand Down

0 comments on commit 6f9a989

Please sign in to comment.