Skip to content

Commit

Permalink
prov/tcp: Pass through rdm_ep flags to msg eps.
Browse files Browse the repository at this point in the history
This patch sets the msg_ep cq completion flags based on
those inherited from the rdm endpoint. This ensures that flags
set by the application while creating an rdm endpoint are preserved
by the msg_ep.

Signed-off-by: Nikhil Nanal <[email protected]>
  • Loading branch information
nikhilnanal committed Oct 20, 2023
1 parent dc10729 commit 96a2f37
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions prov/tcp/src/xnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ xnet_set_commit_flags(struct xnet_xfer_entry *xfer, uint64_t flags)
static inline uint64_t
xnet_tx_completion_get_msgflags(struct xnet_ep *ep, uint64_t flags)
{
/* Generate a completion if msg flags indicate or we generate
* completions by default
*/
/* Generate a completion if msg flags indicate or app
* requests
*/
return (ep->util_ep.tx_msg_flags | flags) & FI_COMPLETION;
}

Expand Down
2 changes: 0 additions & 2 deletions prov/tcp/src/xnet_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ static int xnet_handle_ack(struct xnet_ep *ep)
assert(!slist_empty(&ep->need_ack_queue));
tx_entry = container_of(slist_remove_head(&ep->need_ack_queue),
struct xnet_xfer_entry, entry);
printf("%d:handle_ack:%p", getpid(), tx_entry);
xnet_report_success(tx_entry);
xnet_free_xfer(xnet_ep2_progress(ep), tx_entry);
xnet_reset_rx(ep);
Expand Down Expand Up @@ -1101,7 +1100,6 @@ static void xnet_complete_rx(struct xnet_ep *ep, ssize_t ret)
}

if (!(rx_entry->ctrl_flags & XNET_SAVED_XFER)) {
printf("%d:IN complete_rx: rx_entry:%p, context:%p\n",getpid(), rx_entry, rx_entry->context);
xnet_report_success(rx_entry);
xnet_free_xfer(xnet_ep2_progress(ep), rx_entry);
} else {
Expand Down
5 changes: 5 additions & 0 deletions prov/tcp/src/xnet_rdm_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ static int xnet_bind_conn(struct xnet_rdm *rdm, struct xnet_ep *ep)
if (ret)
return ret;
}
ep->util_ep.tx_msg_flags = rdm->util_ep.tx_msg_flags;
ep->util_ep.rx_msg_flags = rdm->util_ep.rx_msg_flags;
ep->util_ep.tx_op_flags = rdm->util_ep.tx_op_flags;
ep->util_ep.rx_op_flags = rdm->util_ep.rx_op_flags;


return 0;
}
Expand Down

0 comments on commit 96a2f37

Please sign in to comment.