Skip to content

Commit

Permalink
prov/tcp: don't use uring multishot
Browse files Browse the repository at this point in the history
multishot is not supported on older kernels (prior to 5.19) and is
unreliable in early 6.x kernels.

For now, use single-shot and re-submit
  • Loading branch information
ooststep committed Jan 6, 2025
1 parent 751056a commit 9905731
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prov/tcp/src/xnet_pep.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int xnet_listen(struct xnet_pep *pep, struct xnet_progress *progress)

ofi_genlock_lock(&progress->ep_lock);
if (xnet_io_uring) {
ret = xnet_uring_pollin_add(progress, pep->sock, true,
ret = xnet_uring_pollin_add(progress, pep->sock, false,
&pep->pollin_sockctx);
} else {
ret = xnet_monitor_sock(progress, pep->sock, POLLIN,
Expand Down
11 changes: 10 additions & 1 deletion prov/tcp/src/xnet_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ static void xnet_progress_cqe(struct xnet_progress *progress,
struct xnet_ep *ep;
struct xnet_conn_handle *conn;
struct xnet_pep *pep;
int ret;

assert(xnet_io_uring);
sockctx = (struct ofi_sockctx *) cqe->user_data;
Expand All @@ -1351,8 +1352,16 @@ static void xnet_progress_cqe(struct xnet_progress *progress,
case FI_CLASS_PEP:
pep = container_of(fid, struct xnet_pep, util_pep.pep_fid.fid);
if (sockctx == &pep->pollin_sockctx) {
if (cqe->res >= 0)
if (cqe->res >= 0) {
xnet_accept_sock(pep);
ret = xnet_uring_pollin_add(pep->progress, pep->sock,
false, &pep->pollin_sockctx);
if (ret) {
FI_WARN(&xnet_prov, FI_LOG_EP_CTRL,
"pollin add failed (%d)\n", ret);
fi_close(&pep->util_pep.pep_fid.fid);
}
}
}
/* Must be a cancelation otherwise */
break;
Expand Down

0 comments on commit 9905731

Please sign in to comment.