Skip to content

Commit

Permalink
prov/ucx: Fix error code for fi_getopt() and fi_setopt()
Browse files Browse the repository at this point in the history
Should return -FI_ENOPROTOOPT for unsupported options.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
  • Loading branch information
j-xiong committed Aug 29, 2024
1 parent 8a7dd8e commit a049095
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prov/ucx/src/ucx_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int ucx_ep_getopt(fid_t fid, int level, int optname, void *optval,
*optlen = sizeof(size_t);
return FI_SUCCESS;
}
return -FI_EINVAL;
return -FI_ENOPROTOOPT;
}

static int ucx_ep_setopt(fid_t fid, int level, int optname,
Expand All @@ -109,7 +109,7 @@ static int ucx_ep_setopt(fid_t fid, int level, int optname,
ep->ep_opts.mrecv_min_size = *(size_t*)optval;
return FI_SUCCESS;
}
return -FI_EINVAL;
return -FI_ENOPROTOOPT;
}

static int ucx_ep_close(fid_t fid)
Expand Down

0 comments on commit a049095

Please sign in to comment.