From 3ef13045ce9d3568fbd8bf42a919eddf60411a53 Mon Sep 17 00:00:00 2001 From: Zihao Zhao Date: Wed, 2 Sep 2026 14:56:39 +0300 Subject: [PATCH 1/3] UCT/API: allow purge cb return code --- src/uct/api/v2/uct_v2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index cfc7c5deef2..69e2328cac2 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -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 + * 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); From 8aec343c6b8c5ceece565055f98ffcb13bc1d8b6 Mon Sep 17 00:00:00 2001 From: Zihao Zhao Date: Thu, 3 Sep 2026 04:41:47 +0300 Subject: [PATCH 2/3] GTEST/UCT/IB: fix purge cb --- test/gtest/uct/ib/test_ib_mlx5_ext.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/gtest/uct/ib/test_ib_mlx5_ext.cc b/test/gtest/uct/ib/test_ib_mlx5_ext.cc index 0f747b40b45..e2f8692132e 100644 --- a/test/gtest/uct/ib/test_ib_mlx5_ext.cc +++ b/test/gtest/uct/ib/test_ib_mlx5_ext.cc @@ -73,9 +73,10 @@ class test_uct_ib_mlx5_ext_rc : public test_rc { return UCS_OK; } - static void purge_cb(const uct_ep_op_info_t*, void *arg) + static ucs_status_t purge_cb(const uct_ep_op_info_t*, void *arg) { *static_cast(arg) = true; + return UCS_OK; } static void From 632357f6549e6ffc0f5db5be2c4b6e1044e10a3e Mon Sep 17 00:00:00 2001 From: Zihao Zhao Date: Fri, 4 Sep 2026 17:27:57 +0800 Subject: [PATCH 3/3] UCT/API: address comments --- src/uct/api/v2/uct_v2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index 69e2328cac2..89b4ed68e3f 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1917,9 +1917,9 @@ 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 - * to the transport. + * @return @ref UCS_OK - The purged operation was handled successfully. + * Otherwise - The purged operation was handled with error + * and returned back to the transport. */ typedef ucs_status_t (*uct_ep_outstanding_purge_callback_t)( const uct_ep_op_info_t *op_info, void *arg);