Skip to content

Commit

Permalink
DAOS-16971 ofi: add ofi_mrecv patch to OFI build
Browse files Browse the repository at this point in the history
Add ofi_mrecv patch to OFI build.

Signed-off-by: Di Wang <[email protected]>
  • Loading branch information
wangdi1 committed Jan 22, 2025
1 parent d595e30 commit 02a4cd4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright 2016-2024 Intel Corporation

Check failure on line 1 in site_scons/prereq_tools/base.py

View workflow job for this annotation

GitHub Actions / Python isort

Imports are incorrectly sorted and/or formatted.
# Copyright 2025 Google LLC

Check warning on line 2 in site_scons/prereq_tools/base.py

View workflow job for this annotation

GitHub Actions / Pylint check

wrong-spelling-in-comment, Wrong spelling of a word 'LLC' in a comment:
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1091,6 +1092,7 @@ def _resolve_patches(self):
if "^" in raw:
(patch_subdir, raw) = raw.split("^")
if "https://" not in raw:
raw = os.path.join(Dir('#').abspath, raw)
patches[raw] = patch_subdir
continue
patch_name = f"{self.name}_{self._sanitize_patch_path(raw)}_{patchnum:d}"
Expand Down
1 change: 1 addition & 0 deletions utils/build.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ spdk=https://github.com/spdk/spdk/commit/b0aba3fcd5aceceea530a702922153bc7566497
fuse=https://github.com/libfuse/libfuse/commit/c9905341ea34ff9acbc11b3c53ba8bcea35eeed8.diff
mercury=https://raw.githubusercontent.com/daos-stack/mercury/f3dc286fb40ec1a3a38a2e17c45497bc2aa6290d/na_ucx.patch
pmdk=https://github.com/pmem/pmdk/commit/2abe15ac0b4eed894b6768cd82a3b0a7c4336284.diff
ofi=utils/ofi_mrecv.diff
39 changes: 39 additions & 0 deletions utils/ofi_mrecv.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/prov/tcp/src/xnet.h b/prov/tcp/src/xnet.h
index ee16d7e3a..bef992ee1 100644
--- a/prov/tcp/src/xnet.h
+++ b/prov/tcp/src/xnet.h
@@ -228,6 +228,8 @@ struct xnet_srx {
xnet_profile_t *profile;
};

+bool
+xnet_srx_cancel_rx(struct xnet_srx *srx, struct slist *queue, void *context);
int xnet_srx_context(struct fid_domain *domain, struct fi_rx_attr *attr,
struct fid_ep **rx_ep, void *context);

diff --git a/prov/tcp/src/xnet_progress.c b/prov/tcp/src/xnet_progress.c
index aa76968e1..ef6167261 100644
--- a/prov/tcp/src/xnet_progress.c
+++ b/prov/tcp/src/xnet_progress.c
@@ -1114,6 +1114,8 @@ static void xnet_complete_rx(struct xnet_ep *ep, ssize_t ret)
cq_error:
FI_WARN(&xnet_prov, FI_LOG_EP_DATA,
"msg recv failed ret = %zd (%s)\n", ret, fi_strerror((int)-ret));
+ if (rx_entry->ctrl_flags & XNET_MULTI_RECV)
+ xnet_srx_cancel_rx(ep->srx, &ep->srx->rx_queue, rx_entry->context);
xnet_cntr_incerr(rx_entry);
xnet_report_error(rx_entry, (int) -ret);
xnet_free_xfer(xnet_ep2_progress(ep), rx_entry);
diff --git a/prov/tcp/src/xnet_srx.c b/prov/tcp/src/xnet_srx.c
index 153504fe9..d391c3883 100644
--- a/prov/tcp/src/xnet_srx.c
+++ b/prov/tcp/src/xnet_srx.c
@@ -712,7 +712,7 @@ found:
return rx_entry;
}

-static bool
+bool
xnet_srx_cancel_rx(struct xnet_srx *srx, struct slist *queue, void *context)
{
struct slist_entry *cur, *prev;

0 comments on commit 02a4cd4

Please sign in to comment.