Repository navigation
Conversation
|
🤖 Starting review — findings will be posted here when done. |
660ce44 to
3ef1304
Compare
| /** | ||
| * @ingroup UCT_RESOURCE | ||
| * @brief Callback invoked for each undelivered outstanding operation. | ||
| * |
There was a problem hiding this comment.
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.
|
gtest no longer compiles with the new callback signature. In test/gtest/uct/ib/test_ib_mlx5_ext.cc:76, purge_cb is declared as returning void and then assigned to params.cb (line 118), whose type is now ucs_status_t ()(const uct_ep_op_info_t, void*). In C++ this is an incompatible function-pointer type and will fail to compile. The typedef change must be accompanied by updating this callback to return ucs_status_t (and having it return UCS_OK). Note: This is an API signature change to a v2 callback typedef. Worth confirming it does not break existing out-of-tree callback implementations that return void (source compatibility). |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
|
🤖 CI Triage Agent — TL;DR: The aarch64 build failed to compile Full analysisSummary: Root cause: Compiler error at 12:15:10 in the build log: This PR (branch Implicated commit: [REDACTED:Hex High Entropy String] (PR #11882, File: Suggested fix: Update the test callback to the new signature and check its status: static ucs_status_t purge_cb(const uct_ep_op_info_t*, void *arg)
{
*static_cast<bool*>(arg) = true;
return UCS_OK;
}and in EXPECT_UCS_OK(params->cb(&op_info, params->arg));Then grep the tree for any other users of Related: PR #11882 (this change); prior work PR #11668 and PR #11804 added the purge API and this test.
|
|
🤖 Starting review — findings will be posted here when done. |
|
This is a source-level signature change to a public v2 callback typedef (uct_ep_outstanding_purge_callback_t changes from returning void to ucs_status_t). Out-of-tree callbacks currently defined as void-returning will need to be updated to return ucs_status_t; this is a source-compatibility point inherent to the intended change.
No new test exercises the non-OK ("operation not purged, returned to transport") path, since that behavior lives in out-of-tree plugins; the existing test only covers the UCS_OK path. Worth confirming with the author whether a mock exercising the error path is practical, though not required given the in-tree caller ignores the return value. |
| * @return @ref UCS_OK - The operation was purged successfully. | ||
| * Otherwise - The operation was not purged and is returned back |
There was a problem hiding this comment.
| * @return @ref UCS_OK - The operation was purged successfully. | |
| * Otherwise - The operation was not purged and is returned back | |
| * @return @ref UCS_OK - The purged operation was handled successfully. | |
| * Otherwise - The purged operation was handled with error and returned back |
additional question - how should transport handle this error? what's the side effect of it for user?
There was a problem hiding this comment.
Should probably stop processing the next wqes?
There was a problem hiding this comment.
it may lead to hang of upper layer (UCP), it looks like this status useless, UCT cannot react on this and must continue purging.
if UCP is not able to handle its requests, it looks like unrecoverable error on UCP side.
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
evgeny-leksikov
left a comment
There was a problem hiding this comment.
need to clarify use case / behavior
What?
Allow purge CB returning code