Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NA tcp: Add FI_TAG_RPC support #784

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix per comment
  • Loading branch information
jxiong committed Feb 13, 2025
commit 2c62c1d2f95d6df1f5d9d15d5558d27eebd41b2f
14 changes: 9 additions & 5 deletions src/na/na_ofi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3504,6 +3504,15 @@ na_ofi_getinfo(enum na_ofi_prov_type prov_type, const struct na_ofi_info *info,
hints->ep_attr->protocol =
(uint32_t) na_ofi_prov_ep_proto[prov_type];

#if FI_VERSION_GE(FI_COMPILE_VERSION, FI_VERSION(2, 0))
if (FI_VERSION_GE(fi_version(), FI_VERSION(2, 0)) &&
(prov_type == NA_OFI_PROV_TCP)) {
char *env = getenv("NA_OFI_TCP_TAG_RPC");
if (env == NULL || atoi(env) != 0) /* Enabled by default */
hints->ep_attr->mem_tag_format = FI_TAG_RPC;
}
#endif

/* add any additional caps that are particular to this provider */
hints->caps |= na_ofi_prov_extra_caps[prov_type];
#if FI_VERSION_GE(FI_COMPILE_VERSION, FI_VERSION(1, 20))
Expand Down Expand Up @@ -5147,11 +5156,6 @@ na_ofi_endpoint_open(const struct na_ofi_fabric *na_ofi_fabric,
"Msg size max (%zu) larger than provider max (%zu)",
na_ofi_endpoint->expected_msg_size_max, fi_info->ep_attr->max_msg_size);

#if FI_VERSION_GE(FI_COMPILE_VERSION, FI_VERSION(2, 0))
/* Tell ofi to drop unexpected tagged messages */
fi_info->ep_attr->mem_tag_format = FI_TAG_RPC;
#endif

if (sep) {
ret = na_ofi_sep_open(
na_ofi_domain, fi_info, max_contexts, na_ofi_endpoint);
Expand Down
Loading