Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Conflicts:
	utils/build.config
  • Loading branch information
xb committed Oct 12, 2023
2 parents 9a688e3 + bf5d366 commit c04fcec
Show file tree
Hide file tree
Showing 61 changed files with 554 additions and 362 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

jobs:

# Re-use the cache from the landing-builds workflow if available, if not then build the images
# reuse the cache from the landing-builds workflow if available, if not then build the images
# from scratch, but do not save them.
Build-and-test:
name: Run DAOS/NLT tests
Expand Down
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ def check_for_release_target(): # pylint: disable=too-many-locals
try:
remote.push(['refs/heads/{}'.format(branch)],
callbacks=MyCallbacks())
except pygit2.GitError as excpt:
print("Error pushing branch: {}".format(excpt))
except pygit2.GitError as err:
print("Error pushing branch: {}".format(err))
Exit(1)

print("Creating the PR...")
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ sudo ipcrm -M 0x10242049
1. Verify that the `access_points` host is accessible and the port is not used.
1. Check the `provider` entry. See the "Network Scan and Configuration" section of the admin guide for determining the right provider to use.
1. Check `fabric_iface` in `engines`. They should be available and enabled.
1. Check that `socket_dir` is writeable by the daos_server.
1. Check that `socket_dir` is writable by the daos_server.

### Errors creating a Pool
1. Check which engine rank you want to create a pool in with `dmg system query --verbose` and verify their State is Joined.
Expand Down
2 changes: 1 addition & 1 deletion site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def save_build_info(self):
self.__build_info.save('.build_vars.json')

def __parse_build_deps(self):
"""Parse the build dependances command line flag"""
"""Parse the build dependencies command line flag"""
build_deps = GetOption('build_deps')
if build_deps in ('yes', 'only'):
self.download_deps = True
Expand Down
4 changes: 2 additions & 2 deletions src/bio/bio_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ int bio_mc_destroy(struct bio_xs_context *xs_ctxt, uuid_t pool_id, enum bio_mc_f
if (rc == -DER_NONEXIST) {
return 0;
} else if (rc) {
D_ERROR("Qeury data blob for pool "DF_UUID" tgt:%u failed. "DF_RC"\n",
D_ERROR("Query data blob for pool " DF_UUID " tgt:%u failed. " DF_RC "\n",
DP_UUID(pool_id), xs_ctxt->bxc_tgt_id, DP_RC(rc));
return rc;
}
Expand Down Expand Up @@ -906,7 +906,7 @@ int bio_mc_open(struct bio_xs_context *xs_ctxt, uuid_t pool_id,
D_ASSERT(data_blobid == SPDK_BLOBID_INVALID);
return 0;
} else if (rc) {
D_ERROR("Qeury data blob for pool "DF_UUID" tgt:%u failed. "DF_RC"\n",
D_ERROR("Query data blob for pool " DF_UUID " tgt:%u failed. " DF_RC "\n",
DP_UUID(pool_id), xs_ctxt->bxc_tgt_id, DP_RC(rc));
return rc;
}
Expand Down
46 changes: 28 additions & 18 deletions src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,21 @@
#include "crt_internal.h"

/*
* na_dict table should be in the same order of enum crt_provider_t, the last one
* is terminator with NULL nad_str.
* 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_SOCKETS,
.nad_str = "ofi+sockets",
.nad_alt_str = "ofi+socket",
.nad_contig_eps = true,
.nad_port_bind = true,
}, {
.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_GNI,
.nad_str = "ofi+gni",
.nad_contig_eps = true,
.nad_port_bind = false,
}, {
.nad_type = CRT_PROV_OFI_TCP,
.nad_str = "ofi+tcp",
Expand Down Expand Up @@ -156,13 +145,14 @@ crt_hg_parse_uri(const char *uri, crt_provider_t *prov, char *addr)
crt_provider_t
crt_prov_str_to_prov(const char *prov_str)
{
int i;
int i = 0;

for (i = 0; i < CRT_PROV_COUNT; i++) {
while (crt_na_dict[i].nad_str) {
if (strcmp(prov_str, crt_na_dict[i].nad_str) == 0 ||
(crt_na_dict[i].nad_alt_str &&
strcmp(prov_str, crt_na_dict[i].nad_alt_str) == 0))
return crt_na_dict[i].nad_type;
i++;
}

return CRT_PROV_UNKNOWN;
Expand Down Expand Up @@ -511,10 +501,26 @@ crt_provider_domain_get(bool primary, int provider)
return prov_data->cpg_na_config.noc_domain;
}

static struct crt_na_dict *
crt_get_na_dict_entry(int provider)
{
struct crt_na_dict *entry = &crt_na_dict[0];

while (entry && entry->nad_str) {
if (entry->nad_type == provider)
return entry;
entry++;
}

return NULL;
}

char *
crt_provider_name_get(int provider)
{
return crt_na_dict[provider].nad_str;
struct crt_na_dict *entry = crt_get_na_dict_entry(provider);

return entry ? entry->nad_str : NULL;
}

static char*
Expand All @@ -541,13 +547,17 @@ crt_provider_is_block_mode(int provider)
bool
crt_provider_is_contig_ep(int provider)
{
return crt_na_dict[provider].nad_contig_eps;
struct crt_na_dict *entry = crt_get_na_dict_entry(provider);

return entry ? entry->nad_contig_eps : false;
}

bool
crt_provider_is_port_based(int provider)
{
return crt_na_dict[provider].nad_port_bind;
struct crt_na_dict *entry = crt_get_na_dict_entry(provider);

return entry ? entry->nad_port_bind : false;
}

bool
Expand Down
45 changes: 43 additions & 2 deletions src/cart/crt_hg_proc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2023 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -56,7 +56,7 @@ crt_proc_get_op(crt_proc_t proc, crt_proc_op_t *proc_op)
int rc = 0;

if (unlikely(proc == NULL)) {
D_ERROR("Proc is not initilalized.\n");
D_ERROR("Proc is not initialized.\n");
D_GOTO(out, rc = -DER_INVAL);
}

Expand Down Expand Up @@ -254,6 +254,47 @@ crt_proc_d_iov_t(crt_proc_t proc, crt_proc_op_t proc_op, d_iov_t *div)
return rc;
}

int
crt_proc_d_sg_list_t(crt_proc_t proc, crt_proc_op_t proc_op, d_sg_list_t *p)
{
int i;
int rc;

if (FREEING(proc_op)) {
/* NB: don't need free in crt_proc_d_iov_t() */
D_FREE(p->sg_iovs);
return 0;
}

rc = crt_proc_uint32_t(proc, proc_op, &p->sg_nr);
if (unlikely(rc))
return rc;

rc = crt_proc_uint32_t(proc, proc_op, &p->sg_nr_out);
if (unlikely(rc))
return rc;

if (p->sg_nr == 0)
return 0;

if (DECODING(proc_op)) {
D_ALLOC_ARRAY(p->sg_iovs, p->sg_nr);
if (p->sg_iovs == NULL)
return -DER_NOMEM;
}

for (i = 0; i < p->sg_nr; i++) {
rc = crt_proc_d_iov_t(proc, proc_op, &p->sg_iovs[i]);
if (unlikely(rc)) {
if (DECODING(proc_op))
D_FREE(p->sg_iovs);
return rc;
}
}

return rc;
}

static inline int
crt_proc_corpc_hdr(crt_proc_t proc, struct crt_corpc_hdr *hdr)
{
Expand Down
4 changes: 3 additions & 1 deletion src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ crt_lib_init(void)

crt_gdata.cg_refcount = 0;
crt_gdata.cg_inited = 0;
crt_gdata.cg_primary_prov = CRT_PROV_OFI_SOCKETS;
crt_gdata.cg_primary_prov = CRT_PROV_OFI_TCP_RXM;

d_srand(d_timeus_secdiff(0) + getpid());
start_rpcid = ((uint64_t)d_rand()) << 32;

crt_gdata.cg_rpcid = start_rpcid;
crt_gdata.cg_num_cores = sysconf(_SC_NPROCESSORS_ONLN);
crt_gdata.cg_iv_inline_limit = 19456; /* 19KB */
}

/* Library deinit */
Expand Down Expand Up @@ -815,6 +816,7 @@ crt_init_opt(crt_group_id_t grpid, uint32_t flags, crt_init_options_t *opt)

crt_self_test_init();

crt_iv_init(opt);
rc = crt_opc_map_create();
if (rc != 0) {
D_ERROR("crt_opc_map_create() failed, "DF_RC"\n", DP_RC(rc));
Expand Down
2 changes: 2 additions & 0 deletions src/cart/crt_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,6 @@ crt_hdlr_ctl_get_hostname(crt_rpc_t *rpc_req);
void
crt_hdlr_ctl_get_pid(crt_rpc_t *rpc_req);

void
crt_iv_init(crt_init_options_t *ops);
#endif /* __CRT_INTERNAL_H__ */
1 change: 1 addition & 0 deletions src/cart/crt_internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct crt_gdata {
/** credits limitation for #in-flight RPCs per target EP CTX */
uint32_t cg_credit_ep_ctx;

uint32_t cg_iv_inline_limit;
/** the global opcode map */
struct crt_opc_map *cg_opc_map;
/** HG level global data */
Expand Down
Loading

0 comments on commit c04fcec

Please sign in to comment.