Skip to content

Commit 34ae4a8

Browse files
committed
btl/uct: move uct_component from the module to mca_uct_md_t
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
1 parent b593d42 commit 34ae4a8

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

opal/mca/btl/uct/btl_uct.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ struct mca_btl_uct_module_t {
9191
/** array containing the am_tl and rdma_tl */
9292
mca_btl_uct_tl_t *comm_tls[2];
9393

94-
#if UCT_API >= UCT_VERSION(1, 7)
95-
uct_component_h uct_component;
96-
#endif
97-
9894
/** registration cache */
9995
mca_rcache_base_module_t *rcache;
10096

opal/mca/btl/uct/btl_uct_component.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ static int mca_btl_uct_component_process_uct_md(uct_md_resource_desc_t *md_desc)
471471

472472
md = OBJ_NEW(mca_btl_uct_md_t);
473473
md->md_name = strdup(md_desc->md_name);
474+
#if UCT_API >= UCT_VERSION(1, 7)
475+
md->uct_component = component;
476+
#endif
474477

475478
#if UCT_API >= UCT_VERSION(1, 7)
476479
ucs_status = uct_md_config_read(component, NULL, NULL, &uct_config);
@@ -528,10 +531,6 @@ static int mca_btl_uct_component_process_uct_md(uct_md_resource_desc_t *md_desc)
528531
return OPAL_ERR_NOT_AVAILABLE;
529532
}
530533

531-
#if UCT_API >= UCT_VERSION(1, 7)
532-
module->uct_component = component;
533-
#endif
534-
535534
if (!consider_for_connection_module) {
536535
module->module_index = mca_btl_uct_component.module_count;
537536

opal/mca/btl/uct/btl_uct_module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ OBJ_CLASS_INSTANCE(mca_btl_uct_reg_t, opal_free_list_item_t, NULL, NULL);
344344

345345
static void mca_btl_uct_md_construct(mca_btl_uct_md_t *md)
346346
{
347+
md->uct_component = NULL;
347348
md->uct_md = NULL;
348349
md->md_name = NULL;
349350
OBJ_CONSTRUCT(&md->tls, opal_list_t);

opal/mca/btl/uct/btl_uct_rdma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static inline int mca_btl_uct_get_rkey(mca_btl_uct_module_t *module,
5353
}
5454

5555
# if UCT_API >= UCT_VERSION(1, 7)
56-
ucs_status = uct_rkey_unpack(module->uct_component, (void *) remote_handle, rkey);
56+
ucs_status = uct_rkey_unpack(module->md->uct_component, (void *) remote_handle, rkey);
5757
# else
5858
ucs_status = uct_rkey_unpack((void *) remote_handle, rkey);
5959
# endif
@@ -63,7 +63,7 @@ static inline int mca_btl_uct_get_rkey(mca_btl_uct_module_t *module,
6363
static inline void mca_btl_uct_rkey_release(mca_btl_uct_module_t *uct_btl, uct_rkey_bundle_t *rkey)
6464
{
6565
# if UCT_API >= UCT_VERSION(1, 7)
66-
uct_rkey_release(uct_btl->uct_component, rkey);
66+
uct_rkey_release(uct_btl->md->uct_component, rkey);
6767
# else
6868
(void) uct_btl;
6969
uct_rkey_release(rkey);

opal/mca/btl/uct/btl_uct_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ struct mca_btl_uct_md_t {
7575

7676
/** UCT memory domain handle */
7777
uct_md_h uct_md;
78+
79+
#if UCT_API >= UCT_VERSION(1, 7)
80+
uct_component_h uct_component;
81+
#endif
7882
};
7983

8084
typedef struct mca_btl_uct_md_t mca_btl_uct_md_t;

0 commit comments

Comments
 (0)