Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/vos_on_blob_p2' into tan…
Browse files Browse the repository at this point in the history
…abarr/control-display-poolquery-mdonssd

Signed-off-by: Tom Nabarro <[email protected]>
  • Loading branch information
tanabarr committed Sep 4, 2024
2 parents 62c48c7 + 741fb9f commit 5762199
Show file tree
Hide file tree
Showing 111 changed files with 2,080 additions and 1,695 deletions.
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
Loading

0 comments on commit 5762199

Please sign in to comment.