Skip to content
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: Implement common copying of lanes function for futher re-use #5610

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/ucp/wireup/wireup_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,18 @@ static void ucp_cm_copy_ep_lanes(ucp_ep_h to_ep, ucp_ep_h from_ep,
}

ucs_assert(to_ep->uct_eps[lane_idx] == NULL);
status = ucp_wireup_ep_create(to_ep, &to_ep->uct_eps[lane_idx]);
if (status != UCS_OK) {
/* coverity[leaked_storage] */
continue;
}

uct_ep = ucp_wireup_extract_lane(from_ep, lane_idx);
brminich marked this conversation as resolved.
Show resolved Hide resolved
if (uct_ep == NULL) {
continue;
}

status = ucp_wireup_ep_create(to_ep, &to_ep->uct_eps[lane_idx]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just take existing wireup ep, like it was done before?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, since we will need this to set who is the owner of the UCT EP- TMP EP or user's UCP EP

if (status != UCS_OK) {
/* coverity[leaked_storage] */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we failed to create wireup_ep, what happens to the lane we extracted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added ucs_fatal() instead of continue;

continue;
}

ucs_assert(!ucp_wireup_ep_test(from_ep->uct_eps[lane_idx]) ||
ucp_wireup_ep(from_ep->uct_eps[lane_idx])->super.is_owner);

Expand Down