Skip to content

Commit

Permalink
prov/rxm: Report only coll offload capabilities when OFI_OFFLOAD_PROV…
Browse files Browse the repository at this point in the history
…_ONLY is set

fi_query_collective() reports only collective offload provider capabilities if
OFI_OFFLOAD_PROV_ONLY flag is set. Otherwise the sum of both providers' capabilities
is reported.

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Dec 7, 2022
1 parent 2c1361c commit 3c86021
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions prov/rxm/src/rxm_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,25 +313,25 @@ static int rxm_query_collective(struct fid_domain *domain,
uint64_t flags)
{
struct rxm_domain *rxm_domain;
int ret;

rxm_domain = container_of(domain, struct rxm_domain,
util_domain.domain_fid);

if (!rxm_domain->util_coll_domain)
return -FI_ENOSYS;

if (rxm_domain->offload_coll_domain)
return fi_query_collective(rxm_domain->offload_coll_domain,
coll, attr, flags);
ret = fi_query_collective(rxm_domain->offload_coll_domain,
coll, attr, flags);
else
ret = -FI_ENOSYS;

if (FI_SUCCESS == ret || flags & OFI_OFFLOAD_PROV_ONLY)
return ret;

return fi_query_collective(rxm_domain->util_coll_domain,
coll, attr, flags);

/*
* TODO:
* also check offload_coll_domain, we could use flags to indicate
* whether we want to query all the collective providers, or offload
* provider only.
*/
}

static struct fi_ops_domain rxm_domain_ops = {
Expand Down

0 comments on commit 3c86021

Please sign in to comment.