Skip to content

Commit

Permalink
UCT/CM/RDMACM: add UCX_RDMA_CM_SOURCE_ADDRESS config, fix for cstools
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-leksikov committed Dec 10, 2020
1 parent afea033 commit 696e3de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uct/ib/rdmacm/rdmacm_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ UCS_CLASS_INIT_FUNC(uct_rdmacm_cm_t, uct_component_h component,
const uct_rdmacm_cm_config_t *rdmacm_config = ucs_derived_of(config,
uct_rdmacm_cm_config_t);
uct_priv_worker_t *worker_priv;
struct sockaddr_storage *src_addr_storage;
int src_af;
ucs_status_t status;

Expand Down Expand Up @@ -607,8 +608,9 @@ UCS_CLASS_INIT_FUNC(uct_rdmacm_cm_t, uct_component_h component,
if (rdmacm_config->src_addr[0] == '\0') {
self->config.src_addr = NULL;
} else {
self->config.src_addr = ucs_calloc(1, sizeof(struct sockaddr_storage),
src_addr_storage = ucs_calloc(1, sizeof(struct sockaddr_storage),
"rdmacm_src_addr");
self->config.src_addr = (struct sockaddr*)src_addr_storage;
if (self->config.src_addr == NULL) {
ucs_error("cannot allocate memory for rdmacm source address");
status = UCS_ERR_NO_MEMORY;
Expand Down

0 comments on commit 696e3de

Please sign in to comment.