Skip to content

Commit

Permalink
Merge branch 'release/2.6' into ckochhof/hotfix/v2.6.1/daos-14348
Browse files Browse the repository at this point in the history
Required-githooks: true
  • Loading branch information
kanard38 authored and Cedric Koch-Hofer committed Sep 2, 2024
2 parents 2654682 + 0099aa4 commit 608f37e
Show file tree
Hide file tree
Showing 16 changed files with 289 additions and 364 deletions.
2 changes: 1 addition & 1 deletion ci/provisioning/post_provision_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ source ci/provisioning/post_provision_config_common_functions.sh
source ci/junit.sh


: "${MLNX_VER_NUM:=latest-5.8}"
: "${MLNX_VER_NUM:=24.04-0.6.6.0}"

: "${DISTRO:=EL_7}"
DSL_REPO_var="DAOS_STACK_${DISTRO}_LOCAL_REPO"
Expand Down
142 changes: 49 additions & 93 deletions src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,97 +14,52 @@
* List of supported CaRT providers. The table is terminated with the last entry
* having nad_str = NULL.
*/
struct crt_na_dict crt_na_dict[] = {
{
.nad_type = CRT_PROV_SM,
.nad_str = "sm",
.nad_contig_eps = false,
.nad_port_bind = false,
}, {
.nad_type = CRT_PROV_OFI_VERBS_RXM,
.nad_str = "ofi+verbs;ofi_rxm",
.nad_alt_str = "ofi+verbs",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_OFI_TCP,
.nad_str = "ofi+tcp",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_OFI_TCP_RXM,
.nad_str = "ofi+tcp;ofi_rxm",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_OFI_CXI,
.nad_str = "ofi+cxi",
.nad_contig_eps = true,
.nad_port_bind = false,
}, {
.nad_type = CRT_PROV_OFI_OPX,
.nad_str = "ofi+opx",
.nad_contig_eps = false,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC,
.nad_str = "ucx+rc_v",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_UD,
.nad_str = "ucx+ud_v",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC_UD,
.nad_str = "ucx+rc_v,ud_v",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC_O,
.nad_str = "ucx+rc",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_UD_O,
.nad_str = "ucx+ud",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC_UD_O,
.nad_str = "ucx+rc,ud",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC_X,
.nad_str = "ucx+rc_x",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_UD_X,
.nad_str = "ucx+ud_x",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_RC_UD_X,
.nad_str = "ucx+rc_x,ud_x",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_DC_X,
.nad_str = "ucx+dc_x",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_type = CRT_PROV_UCX_TCP,
.nad_str = "ucx+tcp",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.nad_str = NULL,
}
};
struct crt_na_dict crt_na_dict[] = {{
.nad_type = CRT_PROV_SM,
.nad_str = "sm",
.nad_contig_eps = false,
.nad_port_bind = false,
},
{
.nad_type = CRT_PROV_OFI_VERBS_RXM,
.nad_str = "ofi+verbs;ofi_rxm",
.nad_alt_str = "ofi+verbs",
.nad_contig_eps = true,
.nad_port_bind = true,
},
{
.nad_type = CRT_PROV_OFI_TCP,
.nad_str = "ofi+tcp",
.nad_contig_eps = true,
.nad_port_bind = true,
},
{
.nad_type = CRT_PROV_OFI_TCP_RXM,
.nad_str = "ofi+tcp;ofi_rxm",
.nad_contig_eps = true,
.nad_port_bind = true,
},
{
.nad_type = CRT_PROV_OFI_CXI,
.nad_str = "ofi+cxi",
.nad_contig_eps = true,
.nad_port_bind = false,
},
{
.nad_type = CRT_PROV_OFI_OPX,
.nad_str = "ofi+opx",
.nad_contig_eps = false,
.nad_port_bind = true,
},
{
.nad_type = CRT_PROV_UCX,
.nad_str = "ucx+ud_x",
.nad_contig_eps = true,
.nad_port_bind = true,
},
{
.nad_str = NULL,
}};

int
crt_hg_parse_uri(const char *uri, crt_provider_t *prov, char *addr)
Expand Down Expand Up @@ -717,6 +672,8 @@ crt_get_info_string(bool primary, crt_provider_t provider, int iface_idx,
start_port = crt_provider_ctx0_port_get(primary, provider);
domain_str = crt_provider_domain_str_get(primary, provider, iface_idx);

D_ASSERTF(provider_str != NULL, "String for provider=%d not found\n", provider);

/* CXI provider uses domain names for info string */
if (provider == CRT_PROV_OFI_CXI)
iface_str = NULL;
Expand All @@ -735,8 +692,7 @@ crt_get_info_string(bool primary, crt_provider_t provider, int iface_idx,
D_GOTO(out, rc);
}

if (provider_str)
size += strlen(provider_str);
size = strlen(provider_str);
if (domain_str)
size += strlen(domain_str);
if (iface_str)
Expand Down
25 changes: 9 additions & 16 deletions src/cart/crt_hg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define CRT_HG_POST_INCR (512)
#define CRT_HG_MRECV_BUF (16)

#define CRT_UCX_STR "ucx"

struct crt_rpc_priv;
struct crt_common_hdr;
struct crt_corpc_hdr;
Expand All @@ -40,27 +42,17 @@ struct crt_corpc_hdr;
* Enumeration specifying providers supported by the library
*/
typedef enum {
CRT_PROV_SM = 0,
CRT_PROV_SM = 0,
CRT_PROV_OFI_SOCKETS,
CRT_PROV_OFI_VERBS_RXM,
CRT_PROV_OFI_GNI,
CRT_PROV_OFI_TCP,
CRT_PROV_OFI_TCP_RXM,
CRT_PROV_OFI_CXI,
CRT_PROV_OFI_OPX,
CRT_PROV_OFI_LAST = CRT_PROV_OFI_OPX,
CRT_PROV_UCX_RC,
CRT_PROV_UCX_UD,
CRT_PROV_UCX_RC_UD,
CRT_PROV_UCX_RC_O,
CRT_PROV_UCX_UD_O,
CRT_PROV_UCX_RC_UD_O,
CRT_PROV_UCX_RC_X,
CRT_PROV_UCX_UD_X,
CRT_PROV_UCX_RC_UD_X,
CRT_PROV_UCX_DC_X,
CRT_PROV_UCX_TCP,
CRT_PROV_UCX_LAST = CRT_PROV_UCX_TCP,
CRT_PROV_OFI_LAST = CRT_PROV_OFI_OPX,
CRT_PROV_UCX,
CRT_PROV_UCX_LAST = CRT_PROV_UCX,
/* Note: This entry should be the last valid one in enum */
CRT_PROV_COUNT,
CRT_PROV_UNKNOWN = -1,
Expand All @@ -75,8 +67,7 @@ crt_hg_parse_uri(const char *uri, crt_provider_t *prov, char *addr);
static inline bool
crt_provider_is_ucx(crt_provider_t prov)
{
return (prov >= CRT_PROV_UCX_RC) &&
(prov <= CRT_PROV_UCX_LAST);
return (prov >= CRT_PROV_UCX) && (prov <= CRT_PROV_UCX_LAST);
}

static inline bool
Expand All @@ -96,6 +87,8 @@ struct crt_na_dict {
bool nad_port_bind;
/** a flag to indicate if endpoints are contiguous */
bool nad_contig_eps;
/** a flag to indicate if nad_str is allocated on the heap */
bool nad_str_alloc;
};

extern struct crt_na_dict crt_na_dict[];
Expand Down
23 changes: 21 additions & 2 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,13 @@ crt_provider_t
crt_str_to_provider(const char *str_provider)
{
crt_provider_t prov = CRT_PROV_UNKNOWN;
int i;
int i, len;
char *p = NULL;

if (str_provider == NULL)
return prov;

for (i = 0; crt_na_dict[i].nad_str != NULL; i++) {

if (!strncmp(str_provider, crt_na_dict[i].nad_str,
strlen(crt_na_dict[i].nad_str) + 1) ||
(crt_na_dict[i].nad_alt_str &&
Expand All @@ -459,6 +459,21 @@ crt_str_to_provider(const char *str_provider)
prov = crt_na_dict[i].nad_type;
break;
}
if (crt_na_dict[i].nad_type == CRT_PROV_UCX &&
!strncmp(str_provider, CRT_UCX_STR, strlen(CRT_UCX_STR))) {
len = strlen(str_provider);
if (len > strlen(CRT_UCX_STR) && strchr(str_provider, '+')) {
D_STRNDUP(p, str_provider, len);
if (!p) {
return prov;
} else {
crt_na_dict[i].nad_str = p;
crt_na_dict[i].nad_str_alloc = true;
}
}
prov = crt_na_dict[i].nad_type;
break;
}
}

return prov;
Expand Down Expand Up @@ -964,6 +979,10 @@ crt_finalize(void)
crt_na_config_fini(false, crt_gdata.cg_secondary_provs[i]);
}

for (i = 0; crt_na_dict[i].nad_str != NULL; i++)
if (crt_na_dict[i].nad_str_alloc)
D_FREE(crt_na_dict[i].nad_str);

D_FREE(crt_gdata.cg_secondary_provs);
D_FREE(crt_gdata.cg_prov_gdata_secondary);
} else {
Expand Down
7 changes: 0 additions & 7 deletions src/client/dfuse/pil4dfs/int_dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,6 @@ child_hdlr(void)
DL_WARN(rc, "daos_eq_lib_init() failed in child process");
daos_dti_reset();
td_eqh = main_eqh = DAOS_HDL_INVAL;
if (d_eq_count_max > 0) {
rc = daos_eq_create(&td_eqh);
if (rc)
DL_WARN(rc, "daos_eq_create() failed");
else
main_eqh = td_eqh;
}
context_reset = true;
}

Expand Down
27 changes: 24 additions & 3 deletions src/dtx/dtx_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,9 @@ dtx_refresh_internal(struct ds_cont_child *cont, int *check_count, d_list_t *che
/* Handle the entries whose leaders are on current server. */
d_list_for_each_entry_safe(dsp, tmp, &self, dsp_link) {
struct dtx_entry dte;
struct dtx_entry *pdte = &dte;
struct dtx_cos_key dck;


d_list_del(&dsp->dsp_link);

Expand All @@ -1228,13 +1231,31 @@ dtx_refresh_internal(struct ds_cont_child *cont, int *check_count, d_list_t *che
dte.dte_refs = 1;
dte.dte_mbs = dsp->dsp_mbs;

if (for_io) {
rc = vos_dtx_check(cont->sc_hdl, &dsp->dsp_xid, NULL, NULL, NULL, false);
switch(rc) {
case DTX_ST_COMMITTABLE:
dck.oid = dsp->dsp_oid;
dck.dkey_hash = dsp->dsp_dkey_hash;
rc = dtx_commit(cont, &pdte, &dck, 1);
if (rc < 0 && rc != -DER_NONEXIST && for_io)
d_list_add_tail(&dsp->dsp_link, cmt_list);
else
dtx_dsp_free(dsp);
continue;
case DTX_ST_COMMITTED:
case -DER_NONEXIST: /* Aborted */
dtx_dsp_free(dsp);
continue;
default:
break;
}
}

rc = dtx_status_handle_one(cont, &dte, dsp->dsp_oid, dsp->dsp_dkey_hash,
dsp->dsp_epoch, NULL, NULL);
switch (rc) {
case DSHR_NEED_COMMIT: {
struct dtx_entry *pdte = &dte;
struct dtx_cos_key dck;

dck.oid = dsp->dsp_oid;
dck.dkey_hash = dsp->dsp_dkey_hash;
rc = dtx_commit(cont, &pdte, &dck, 1);
Expand Down
Loading

0 comments on commit 608f37e

Please sign in to comment.