-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UCP/WIREUP: Add flush+destroy of UCT EPs used by TMP EP lanes #5613
Changes from 8 commits
7de5445
631b32c
72190be
cdd175c
4e1c626
88b41c8
9df2346
41b63de
b94d406
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1014,16 +1014,25 @@ void ucp_ep_destroy(ucp_ep_h ep) | |
return; | ||
} | ||
|
||
int ucp_ep_config_lane_is_equal(const ucp_ep_config_key_t *key1, | ||
const ucp_ep_config_key_t *key2, | ||
ucp_lane_index_t lane, int compare_types) | ||
int ucp_ep_config_lane_tl_is_equal(const ucp_ep_config_key_t *key1, | ||
ucp_lane_index_t lane1, | ||
const ucp_ep_config_key_t *key2, | ||
ucp_lane_index_t lane2) | ||
{ | ||
return (key1->lanes[lane].rsc_index == key2->lanes[lane].rsc_index) && | ||
(key1->lanes[lane].proxy_lane == key2->lanes[lane].proxy_lane) && | ||
(key1->lanes[lane].dst_md_index == key2->lanes[lane].dst_md_index) && | ||
(key1->lanes[lane].path_index == key2->lanes[lane].path_index) && | ||
((key1->lanes[lane].lane_types == key2->lanes[lane].lane_types) || | ||
!compare_types); | ||
return (key1->lanes[lane1].rsc_index == key2->lanes[lane2].rsc_index) && | ||
(key1->lanes[lane1].dst_dev_index == key2->lanes[lane2].dst_dev_index) && | ||
(key1->lanes[lane1].path_index == key2->lanes[lane2].path_index); | ||
} | ||
|
||
static int ucp_ep_config_lane_is_equal(const ucp_ep_config_key_t *key1, | ||
const ucp_ep_config_key_t *key2, | ||
ucp_lane_index_t lane1, | ||
ucp_lane_index_t lane2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need only one lane There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
{ | ||
return ucp_ep_config_lane_tl_is_equal(key1, lane1, key2, lane2) && | ||
(key1->lanes[lane1].proxy_lane == key2->lanes[lane2].proxy_lane) && | ||
(key1->lanes[lane1].dst_md_index == key2->lanes[lane2].dst_md_index) && | ||
(key1->lanes[lane1].lane_types == key2->lanes[lane2].lane_types); | ||
} | ||
|
||
int ucp_ep_config_is_equal(const ucp_ep_config_key_t *key1, | ||
|
@@ -1052,7 +1061,7 @@ int ucp_ep_config_is_equal(const ucp_ep_config_key_t *key1, | |
} | ||
|
||
for (lane = 0; lane < key1->num_lanes; ++lane) { | ||
if (!ucp_ep_config_lane_is_equal(key1, key2, lane, 1)) | ||
if (!ucp_ep_config_lane_is_equal(key1, key2, lane, lane)) | ||
{ | ||
return 0; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,9 +271,9 @@ ucp_wireup_match_p2p_lanes(ucp_ep_h ep, | |
|
||
static ucs_status_t | ||
ucp_wireup_find_remote_p2p_addr(ucp_ep_h ep, ucp_lane_index_t remote_lane, | ||
const ucp_unpacked_address_t *remote_address, | ||
const uct_ep_addr_t **ep_addr_p, | ||
const uct_device_addr_t **dev_addr_p) | ||
const ucp_unpacked_address_t *remote_address, | ||
const uct_ep_addr_t **ep_addr_p, | ||
const uct_device_addr_t **dev_addr_p) | ||
{ | ||
const ucp_address_entry_t *address; | ||
unsigned ep_addr_index; | ||
|
@@ -292,6 +292,22 @@ ucp_wireup_find_remote_p2p_addr(ucp_ep_h ep, ucp_lane_index_t remote_lane, | |
return UCS_ERR_UNREACHABLE; | ||
} | ||
|
||
ucp_lane_index_t | ||
ucp_wireup_ep_configs_use_same_tl_lane(ucp_ep_config_key_t *key1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ucp_wireup_ep_configs_can_reuse_lane There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
ucp_ep_config_key_t *key2, | ||
ucp_lane_index_t lane) | ||
{ | ||
ucp_lane_index_t lane_idx; | ||
|
||
for (lane_idx = 0; lane_idx < key2->num_lanes; ++lane_idx) { | ||
if (ucp_ep_config_lane_tl_is_equal(key1, lane, key2, lane_idx)) { | ||
return lane_idx; | ||
} | ||
} | ||
|
||
return UCP_NULL_LANE; | ||
} | ||
|
||
ucs_status_t | ||
ucp_wireup_connect_local(ucp_ep_h ep, | ||
const ucp_unpacked_address_t *remote_address, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ucp_ep_config_lane_is_same_peer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed