Repository navigation
[WIP][DNM]UCT/API: allow purge cb returning code #11882
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
Changes from 2 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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1916,8 +1916,12 @@ typedef struct uct_ep_op_info { | |||||||||
| /** | ||||||||||
| * @ingroup UCT_RESOURCE | ||||||||||
| * @brief Callback invoked for each undelivered outstanding operation. | ||||||||||
| * | ||||||||||
| * @return @ref UCS_OK - The operation was purged successfully. | ||||||||||
| * Otherwise - The operation was not purged and is returned back | ||||||||||
|
Contributor
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.
Suggested change
additional question - how should transport handle this error? what's the side effect of it for user?
Contributor
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. Should probably stop processing the next wqes?
Contributor
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. it may lead to hang of upper layer (UCP), it looks like this status useless, UCT cannot react on this and must continue purging. |
||||||||||
| * to the transport. | ||||||||||
| */ | ||||||||||
| typedef void (*uct_ep_outstanding_purge_callback_t)( | ||||||||||
| typedef ucs_status_t (*uct_ep_outstanding_purge_callback_t)( | ||||||||||
| const uct_ep_op_info_t *op_info, void *arg); | ||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
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.
The return value is not consumed or documented anywhere. The new doc says UCS_OK means the error was handled and otherwise it is "returned back", but: no in-tree caller consumes the status (the only invocation is in test_ib_mlx5_ext.cc:72, which discards the return value); and the uct_ep_outstanding_purge function doc and uct_ep_outstanding_purge_params_t::cb doc are not updated to describe what "returned back" means (e.g. does a non-UCS_OK from the callback abort the purge, and does it propagate out of uct_ep_outstanding_purge?). Please clarify in the API docs how the status flows back to the uct_ep_outstanding_purge caller, and update the test callback so the change is exercised.