Skip to content

Commit

Permalink
prov/tcp: add debug prints for connection targets
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Oost <[email protected]>
  • Loading branch information
ooststep committed Feb 10, 2023
1 parent 6403ac3 commit 4ee15cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions prov/tcp/src/xnet_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ void xnet_run_conn(struct xnet_conn_handle *conn, bool pin, bool pout, bool perr
if (ret)
goto freeinfo;

ofi_straddr_dbg(&xnet_prov, FI_LOG_EP_CTRL, "conn req from dest",
cm_entry.info->dest_addr);
ofi_straddr_dbg(&xnet_prov, FI_LOG_EP_CTRL, "conn req for src",
cm_entry.info->src_addr);
conn->endian_match = (msg.hdr.conn_data == 1);
cm_entry.info->handle = &conn->fid;
datalen = ntohs(msg.hdr.seg_size);
Expand Down
3 changes: 2 additions & 1 deletion prov/tcp/src/xnet_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ static int xnet_ep_connect(struct fid_ep *ep_fid, const void *addr,
struct xnet_ep *ep;
int ret;

FI_DBG(&xnet_prov, FI_LOG_EP_CTRL, "connecting endpoint\n");

ofi_straddr_dbg(&xnet_prov, FI_LOG_EP_CTRL, "connecting to", addr);
ep = container_of(ep_fid, struct xnet_ep, util_ep.ep_fid);
if (!addr || (ep->bsock.sock == INVALID_SOCKET) ||
(paramlen > XNET_MAX_CM_DATA_SIZE) || (ep->state != XNET_IDLE))
Expand Down
3 changes: 3 additions & 0 deletions prov/tcp/src/xnet_rdm_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ static int xnet_rdm_connect(struct xnet_conn *conn)
msg.resv = 0;
msg.port = htons(ofi_addr_get_port(&conn->rdm->addr.sa));

ofi_straddr_dbg(&xnet_prov, FI_LOG_EP_CTRL, "rdm addr", &conn->rdm->addr);
ofi_straddr_dbg(&xnet_prov, FI_LOG_EP_CTRL, "src addr", info->src_addr);

ret = fi_connect(&conn->ep->util_ep.ep_fid, info->dest_addr,
&msg, sizeof msg);
if (ret) {
Expand Down

0 comments on commit 4ee15cd

Please sign in to comment.