Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ooststep committed Jul 3, 2024
1 parent 8e1f573 commit 838a840
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 1 addition & 2 deletions fabtests/functional/multi_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ int main(int argc, char **argv)
hints->caps = FI_MSG | FI_RMA;
hints->mode = FI_CONTEXT;
hints->domain_attr->mr_mode = opts.mr_mode;
hints->domain_attr->threading = shared_cq ? FI_THREAD_DOMAIN :
FI_THREAD_COMPLETION;
hints->domain_attr->threading = FI_THREAD_COMPLETION;
hints->addr_format = opts.address_format;

ret = run_test();
Expand Down
13 changes: 9 additions & 4 deletions prov/tcp/src/xnet_rdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,16 +785,20 @@ void set_subdomain(struct xnet_rdm *rdm, struct xnet_domain *domain,
{
int i;
struct util_cntr *cntr;
printf(">>> main: %p\n", &domain->util_domain);
printf(">>> sub: %p\n", &subdomain->util_domain);

if (rdm->util_ep.rx_cq->domain == &domain->util_domain) {
ofi_atomic_dec32(&domain->util_domain.ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);
printf(">>> rx: %p\n", rdm->util_ep.rx_cq->domain);
rdm->util_ep.rx_cq->domain = &subdomain->util_domain;
}

if (rdm->util_ep.tx_cq->domain == &domain->util_domain) {
ofi_atomic_dec32(&domain->util_domain.ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);
printf(">>> tx: %p\n", rdm->util_ep.rx_cq->domain);
rdm->util_ep.tx_cq->domain = &subdomain->util_domain;
}

Expand All @@ -806,6 +810,7 @@ void set_subdomain(struct xnet_rdm *rdm, struct xnet_domain *domain,
if (cntr->domain == &domain->util_domain) {
ofi_atomic_dec32(&domain->util_domain.ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);
printf(">>> cntr[%d]: %p\n", i, rdm->util_ep.rx_cq->domain);
cntr->domain = &subdomain->util_domain;
}
}
Expand Down Expand Up @@ -846,14 +851,14 @@ int xnet_rdm_resolve_domains(struct xnet_rdm *rdm)
if (ret)
return ret;

//once for rdm ep, once for srx
ofi_atomic_dec32(&rdm->util_ep.domain->ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);
ofi_atomic_dec32(&rdm->util_ep.domain->ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);

rdm->util_ep.domain = &subdomain->util_domain;

ofi_atomic_dec32(&rdm->srx->domain->util_domain.ref);
ofi_atomic_inc32(&subdomain->util_domain.ref);
rdm->srx->domain = subdomain;

return ret;
}

Expand Down
3 changes: 3 additions & 0 deletions util/pingpong.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,9 @@ static int pp_getinfo(struct ct_pingpong *ct, struct fi_info *hints,
if (!hints->ep_attr->type)
hints->ep_attr->type = FI_EP_DGRAM;


hints->domain_attr->threading = FI_THREAD_COMPLETION;

ret = fi_getinfo(FI_VERSION(FI_MAJOR_VERSION, FI_MINOR_VERSION),
NULL, NULL, flags, hints, info);
if (ret) {
Expand Down

0 comments on commit 838a840

Please sign in to comment.