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
Prev Previous commit
Next Next commit
UCP/WIREUP: Check that to_ep and from_ep have the same config
dmitrygx committed Aug 26, 2020
commit d8c27f134f5735e507befd02e6aa9b011740ed04
5 changes: 5 additions & 0 deletions src/ucp/wireup/wireup_cm.c
Original file line number Diff line number Diff line change
@@ -272,6 +272,11 @@ static void ucp_cm_copy_ep_lanes(ucp_ep_h to_ep, ucp_ep_h from_ep,
to_is_owner = change_ownership;
from_is_owner = !change_ownership;

ucs_assertv_always(to_ep->cfg_index == from_ep->cfg_index,
"to_ep=%p (cfg_index=%u) must has the same "
"configuration as from_ep=%p (cfg_index=%u)",
to_ep, to_ep->cfg_index, from_ep, from_ep->cfg_index);

for (lane_idx = 0; lane_idx < ucp_ep_num_lanes(from_ep); ++lane_idx) {
if ((lane_idx == ucp_ep_get_cm_lane(from_ep)) ||
(from_ep->uct_eps[lane_idx] == NULL)) {