Skip to content

Commit

Permalink
Test efa direct
Browse files Browse the repository at this point in the history
Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Jan 21, 2025
1 parent 71f34f0 commit c8a2119
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fabtests/benchmarks/benchmark_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ int pingpong_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
return EXIT_FAILURE;
}

inject_size = 0;
/* Init rx_buf with invalid iteration number.
* This must be done before the sender sends any data.
*/
Expand All @@ -333,7 +334,7 @@ int pingpong_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
if (rma_op == FT_RMA_WRITE)
*(tx_buf + opts.transfer_size - 1) = (char)i;

if (opts.transfer_size <= inject_size)
if (opts.transfer_size < inject_size)
ret = ft_inject_rma(rma_op, remote, ep,
remote_fi_addr,
opts.transfer_size);
Expand All @@ -359,7 +360,7 @@ int pingpong_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
if (rma_op == FT_RMA_WRITE)
*(tx_buf + opts.transfer_size - 1) = (char)i;

if (opts.transfer_size <= inject_size)
if (opts.transfer_size < inject_size)
ret = ft_inject_rma(rma_op, remote, ep,
remote_fi_addr,
opts.transfer_size);
Expand Down Expand Up @@ -602,6 +603,7 @@ int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
if (ft_check_opts(FT_OPT_VERIFY_DATA))
inject_size = 0;

inject_size = 0;
ret = ft_sync();
if (ret)
return ret;
Expand Down Expand Up @@ -629,7 +631,7 @@ int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
}
switch (rma_op) {
case FT_RMA_WRITE:
if (opts.transfer_size <= inject_size) {
if (opts.transfer_size < inject_size) {
ret = ft_post_rma_inject(FT_RMA_WRITE, tx_buf + offset,
opts.transfer_size, remote);
} else if (opts.use_fi_more) {
Expand All @@ -656,7 +658,7 @@ int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
rx_seq++;

} else {
if (opts.transfer_size <= inject_size) {
if (opts.transfer_size < inject_size) {
ret = ft_post_rma_inject(FT_RMA_WRITEDATA,
tx_buf + offset,
opts.transfer_size,
Expand Down
2 changes: 2 additions & 0 deletions prov/efa/src/efa_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ int efa_domain_open(struct fid_fabric *fabric_fid, struct fi_info *info,
goto err_free;
}
efa_domain->util_domain.domain_fid.ops = &efa_ops_domain_rdm;
efa_domain->util_domain.domain_fid.ops->endpoint = efa_ep_open;
efa_domain->util_domain.domain_fid.ops->cq_open = efa_cq_open;
} else {
assert(EFA_EP_TYPE_IS_DGRAM(info));
efa_domain->util_domain.domain_fid.ops = &efa_ops_domain_dgram;
Expand Down

0 comments on commit c8a2119

Please sign in to comment.