Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-15800 client: create cart context on specific interface #14804

Merged
merged 6 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client/api/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,11 @@ daos_eq_create(daos_handle_t *eqh)
char iface[DAOS_SYS_INFO_STRING_MAX];

rc = dc_mgmt_get_iface(&iface[0]);
if (rc) {
if (rc && rc != -DER_NONEXIST) {
D_ERROR("failed to get iface: " DF_RC "\n", DP_RC(rc));
daos_eq_free(&eqx->eqx_hlink);
return rc;
}

/** if no interface returned, use the default */
if (rc == -DER_NONEXIST)
rc = crt_context_create(&eqx->eqx_ctx);
Expand Down
13 changes: 7 additions & 6 deletions src/mgmt/cli_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,14 +644,15 @@ dc_mgmt_net_cfg(const char *name, crt_init_options_t *crt_info)

d_getenv_bool("D_DYNAMIC_CTX", &d_dynamic_ctx_g);
if (d_dynamic_ctx_g) {
int i;
int i, cnt = 0;
mchaarawi marked this conversation as resolved.
Show resolved Hide resolved

for (i = 0; i < resp->n_numa_fabric_interfaces; i++)
cnt += resp_g->numa_fabric_interfaces[i]->n_ifaces + 1;
frostedcmos marked this conversation as resolved.
Show resolved Hide resolved

D_ALLOC(crt_info->cio_interface,
DAOS_SYS_INFO_STRING_MAX * resp->n_numa_fabric_interfaces);
D_ALLOC(crt_info->cio_interface, DAOS_SYS_INFO_STRING_MAX * cnt);
if (crt_info->cio_interface == NULL)
D_GOTO(cleanup, rc = -DER_NOMEM);
D_ALLOC(crt_info->cio_domain,
DAOS_SYS_INFO_STRING_MAX * resp->n_numa_fabric_interfaces);
D_ALLOC(crt_info->cio_domain, DAOS_SYS_INFO_STRING_MAX * cnt);
if (crt_info->cio_domain == NULL)
D_GOTO(cleanup, rc = -DER_NOMEM);

Expand All @@ -673,7 +674,7 @@ dc_mgmt_net_cfg(const char *name, crt_init_options_t *crt_info)
* there. So initialize the index array at that interface to -1 to know that
* this is the first selection later.
*/
if (numa_ifaces->n_ifaces)
if (numa_ifaces->n_ifaces > 1)
info_g.numa_iface_idx_rr[i] = -1;
}
} else {
Expand Down
Loading