Skip to content

Commit

Permalink
prov/efa: Add debug log for efa-direct data transfer
Browse files Browse the repository at this point in the history
Add debug log for send/recv/write/read and cq poll

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Jan 31, 2025
1 parent 6793260 commit 1829c30
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prov/efa/src/efa_cq.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ void efa_cq_poll_ibv_cq(ssize_t cqe_to_process, struct efa_ibv_cq *ibv_cq)
}

efa_cq_construct_cq_entry(cq->ibv_cq.ibv_cq_ex, &cq_entry);
EFA_DBG(FI_LOG_CQ,
"Write cq entry of context: %lx, flags: %lx\n",
(size_t) cq_entry.op_context, cq_entry.flags);

switch (opcode) {
case IBV_WC_SEND: /* fall through */
Expand Down
10 changes: 10 additions & 0 deletions prov/efa/src/efa_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ static inline ssize_t efa_post_recv(struct efa_base_ep *base_ep, const struct fi

efa_tracepoint(recv_begin_msg_context, (size_t) msg->context, (size_t) msg->addr);

EFA_DBG(FI_LOG_EP_DATA,
"total len: %zu, addr: %lu, context: %lx, flags: %lx\n",
ofi_total_iov_len(msg->msg_iov, msg->iov_count),
msg->addr, (size_t) msg->context, flags);

ofi_genlock_lock(&base_ep->util_ep.lock);
wr_index = base_ep->recv_wr_index;
if (wr_index >= base_ep->info->rx_attr->size) {
Expand Down Expand Up @@ -203,6 +208,11 @@ static inline ssize_t efa_post_send(struct efa_base_ep *base_ep, const struct fi

efa_tracepoint(send_begin_msg_context, (size_t) msg->context, (size_t) msg->addr);

EFA_DBG(FI_LOG_EP_DATA,
"total len: %zu, addr: %lu, context: %lx, flags: %lx\n",
ofi_total_iov_len(msg->msg_iov, msg->iov_count),
msg->addr, (size_t) msg->context, flags);

dump_msg(msg, "send");

conn = efa_av_addr_to_conn(base_ep->av, msg->addr);
Expand Down
10 changes: 10 additions & 0 deletions prov/efa/src/efa_rma.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ static inline ssize_t efa_rma_post_read(struct efa_base_ep *base_ep,

efa_tracepoint(read_begin_msg_context, (size_t) msg->context, (size_t) msg->addr);

EFA_DBG(FI_LOG_EP_DATA,
"total len: %zu, addr: %lu, context: %lx, flags: %lx\n",
ofi_total_iov_len(msg->msg_iov, msg->iov_count),
msg->addr, (size_t) msg->context, flags);

assert(msg->iov_count > 0 &&
msg->iov_count <= base_ep->domain->info->tx_attr->iov_limit);
assert(msg->rma_iov_count > 0 &&
Expand Down Expand Up @@ -219,6 +224,11 @@ static inline ssize_t efa_rma_post_write(struct efa_base_ep *base_ep,

efa_tracepoint(write_begin_msg_context, (size_t) msg->context, (size_t) msg->addr);

EFA_DBG(FI_LOG_EP_DATA,
"total len: %zu, addr: %lu, context: %lx, flags: %lx\n",
ofi_total_iov_len(msg->msg_iov, msg->iov_count),
msg->addr, (size_t) msg->context, flags);

qp = base_ep->qp;

ofi_genlock_lock(&base_ep->util_ep.lock);
Expand Down

0 comments on commit 1829c30

Please sign in to comment.