From 834197094e81f1afd87c83cd62275c4df309624b Mon Sep 17 00:00:00 2001 From: Jianxin Xiong Date: Wed, 4 Dec 2024 12:16:53 -0800 Subject: [PATCH] prov/ucx: Fix incorrect return value checking for fi_param_get() When reading the two runtime parameters the condition for the actions was inverted by mistake. Signed-off-by: Jianxin Xiong --- prov/ucx/src/ucx_domain.c | 2 +- prov/ucx/src/ucx_fabric.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prov/ucx/src/ucx_domain.c b/prov/ucx/src/ucx_domain.c index f608ba66574..2e03bd4b8dc 100644 --- a/prov/ucx/src/ucx_domain.c +++ b/prov/ucx/src/ucx_domain.c @@ -368,7 +368,7 @@ int ucx_domain_open(struct fid_fabric *fabric, struct fi_info *info, return -ENOMEM; ofi_status = fi_param_get_size_t(NULL, "universe_size", &univ_size); - if (ofi_status) { + if (ofi_status == FI_SUCCESS) { params.estimated_num_eps = univ_size; params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_EPS; } diff --git a/prov/ucx/src/ucx_fabric.c b/prov/ucx/src/ucx_fabric.c index 106c7127db1..eba1263a9b7 100644 --- a/prov/ucx/src/ucx_fabric.c +++ b/prov/ucx/src/ucx_fabric.c @@ -87,7 +87,7 @@ static char* ucx_local_host_resolve() char *result = NULL; status = fi_param_get(&ucx_prov, "ns_iface", &iface); - if (!status) + if (status != FI_SUCCESS) iface = NULL; if (getifaddrs(&ifaddr) == -1) {