-
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/PROTO/RECONFIG: Fix copy header handling in reconfig. #10452
Changes from all commits
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 |
---|---|---|
|
@@ -10,8 +10,10 @@ | |
|
||
#include "proto_debug.h" | ||
#include "proto_select.h" | ||
#include "proto_am.inl" | ||
#include "proto_common.inl" | ||
|
||
#include <ucp/am/ucp_am.inl> | ||
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. Order |
||
#include <ucp/core/ucp_worker.inl> | ||
|
||
|
||
|
@@ -30,11 +32,21 @@ static ucs_status_t ucp_proto_reconfig_select_progress(uct_pending_req_t *self) | |
return req->send.uct.func(&req->send.uct); | ||
} | ||
|
||
static void ucp_proto_reconfig_abort(ucp_request_t *req, ucs_status_t status) | ||
{ | ||
if (ucp_proto_config_is_am(req->send.proto_config)) { | ||
ucp_am_release_user_header(req); | ||
} | ||
|
||
ucp_request_complete_send(req, status); | ||
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. Add blank line |
||
} | ||
|
||
static ucs_status_t ucp_proto_reconfig_progress(uct_pending_req_t *self) | ||
{ | ||
ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); | ||
ucp_ep_h ep = req->send.ep; | ||
UCS_STRING_BUFFER_ONSTACK(strb, 256); | ||
ucs_status_t status; | ||
|
||
/* This protocol should not be selected for valid and connected endpoint */ | ||
if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { | ||
|
@@ -47,10 +59,19 @@ static ucs_status_t ucp_proto_reconfig_progress(uct_pending_req_t *self) | |
ucp_operation_names, &strb); | ||
ucs_error("cannot find remote protocol for: %s", | ||
ucs_string_buffer_cstr(&strb)); | ||
ucp_request_complete_send(req, UCS_ERR_CANCELED); | ||
ucp_proto_request_abort(req, UCS_ERR_CANCELED); | ||
return UCS_OK; | ||
} | ||
|
||
if (ucp_proto_config_is_am(req->send.proto_config) && | ||
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. can we reuse ucp_am_handle_user_header_send_status_or_abort? 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. How we will know if |
||
(req->send.msg_proto.am.flags & UCP_AM_SEND_FLAG_COPY_HEADER)) { | ||
status = ucp_proto_am_req_copy_header(req); | ||
if (status != UCS_OK) { | ||
ucp_proto_request_abort(req, status); | ||
return UCS_OK; | ||
} | ||
} | ||
|
||
if (ep->cfg_index != req->send.proto_config->ep_cfg_index) { | ||
ucp_trace_req(req, | ||
"ep configuration changed from %d to %d," | ||
|
@@ -96,6 +117,6 @@ ucp_proto_t ucp_reconfig_proto = { | |
.probe = ucp_proto_reconfig_probe, | ||
.query = ucp_proto_default_query, | ||
.progress = {ucp_proto_reconfig_progress}, | ||
.abort = ucp_request_complete_send, | ||
.abort = ucp_proto_reconfig_abort, | ||
.reset = (ucp_request_reset_func_t)ucs_empty_function_return_success | ||
}; |
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.
Order