Skip to content

Commit

Permalink
fabtests: corrected flags argumet type in ft_sendmsg/ft_recvmsg funct…
Browse files Browse the repository at this point in the history
…ions

fixed fabtests send and recv functions to use flags argument type as
uint64_t instead of int as the underlying fi calls use uint64_t.
removed declaration of unused function ft_writemsg from shared.h

Also fixed functions calling ft_sendmsg and ft_recvmsg touse uint64_t for flags

Signed-off-by: Nikhil Nanal <[email protected]>
  • Loading branch information
nikhilnanal authored and aingerson committed Dec 18, 2024
1 parent e5fe96e commit 9b7f27c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 5 additions & 3 deletions fabtests/benchmarks/benchmark_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static int rma_bw_rx_comp()
return ft_tx(ep, remote_fi_addr, FT_RMA_SYNC_MSG_BYTES, &tx_ctx);
}

static int set_fi_more_flag(int i, int j, int flags)
static uint64_t set_fi_more_flag(int i, int j, uint64_t flags)
{
if (j < opts.window_size - 1 && i >= opts.warmup_iterations &&
i < opts.iterations + opts.warmup_iterations - 1) {
Expand All @@ -438,7 +438,8 @@ static int set_fi_more_flag(int i, int j, int flags)

int bandwidth(void)
{
int ret, i, j, flags = 0;
int ret, i, j;
uint64_t flags = 0;
size_t inject_size = fi->tx_attr->inject_size;

ret = fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_INJECT_MSG_SIZE,
Expand Down Expand Up @@ -579,7 +580,8 @@ static int bw_rma_comp(enum ft_rma_opcodes rma_op, int num_completions)

int bandwidth_rma(enum ft_rma_opcodes rma_op, struct fi_rma_iov *remote)
{
int ret, i, j, flags = 0;
int ret, i, j;
uint64_t flags = 0;
size_t offset, inject_size = fi->tx_attr->inject_size;

ret = fi_getopt(&ep->fid, FI_OPT_ENDPOINT, FI_OPT_INJECT_RMA_SIZE,
Expand Down
4 changes: 2 additions & 2 deletions fabtests/common/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -2923,7 +2923,7 @@ int ft_tx_msg(struct fid_ep *ep, fi_addr_t fi_addr, void *buf, size_t size, void
}

int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr,
void *buf, size_t size, void *ctx, int flags)
void *buf, size_t size, void *ctx, uint64_t flags)
{
struct fi_msg msg;
struct fi_msg_tagged tagged_msg;
Expand Down Expand Up @@ -2963,7 +2963,7 @@ int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr,


int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr, void *buf,
size_t size, void *ctx, int flags)
size_t size, void *ctx, uint64_t flags)
{
struct fi_msg msg;
struct fi_msg_tagged tagged_msg;
Expand Down
6 changes: 2 additions & 4 deletions fabtests/include/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,9 @@ int ft_get_cq_comp(struct fid_cq *cq, uint64_t *cur, uint64_t total, int timeout
int ft_get_cntr_comp(struct fid_cntr *cntr, uint64_t total, int timeout);

int ft_recvmsg(struct fid_ep *ep, fi_addr_t fi_addr,
void *buf, size_t size, void *ctx, int flags);
void *buf, size_t size, void *ctx, uint64_t flags);
int ft_sendmsg(struct fid_ep *ep, fi_addr_t fi_addr,
void *buf, size_t size, void *ctx, int flags);
int ft_writemsg(struct fid_ep *ep, fi_addr_t fi_addr, void *buf, size_t size,
void *ctx, struct fi_rma_iov *remote, int flags);
void *buf, size_t size, void *ctx, uint64_t flags);
int ft_tx_msg(struct fid_ep *ep, fi_addr_t fi_addr,
void *buf, size_t size, void *ctx, uint64_t flags);
int ft_cq_read_verify(struct fid_cq *cq, void *op_context);
Expand Down

0 comments on commit 9b7f27c

Please sign in to comment.