From e41a09798e67f3760d2e4991b986427de4a0c119 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Wed, 1 Apr 2026 13:59:25 +0300 Subject: [PATCH 01/10] UCT/PLUGIN: add definition in uct_iface_attr_v2_t for uct_iface_query_v2 --- src/uct/api/v2/uct_v2.h | 85 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 80 insertions(+), 5 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index e4be474f0ef..b4180ec3a43 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -273,7 +273,11 @@ enum uct_ep_attr_field { /** Enables @ref uct_ep_attr::local_address */ UCT_EP_ATTR_FIELD_LOCAL_SOCKADDR = UCS_BIT(0), /** Enables @ref uct_ep_attr::remote_address */ - UCT_EP_ATTR_FIELD_REMOTE_SOCKADDR = UCS_BIT(1) + UCT_EP_ATTR_FIELD_REMOTE_SOCKADDR = UCS_BIT(1), + /** Enables @ref uct_ep_attr::tx_token */ + UCT_EP_ATTR_FIELD_TX_TOKEN = UCS_BIT(2), + /** Enables @ref uct_ep_attr::rx_token */ + UCT_EP_ATTR_FIELD_RX_TOKEN = UCS_BIT(3) }; @@ -414,6 +418,22 @@ struct uct_ep_attr { * Remote sockaddr the endpoint is connected to. */ struct sockaddr_storage remote_address; + + /** + * Opaque TX token buffer. + * Valid when @ref UCT_EP_ATTR_FIELD_TX_TOKEN is set in @ref field_mask. + * Caller allocates a buffer of @ref uct_iface_attr_v2_t::tx_token_length + * bytes and sets this pointer; callee fills the buffer with the token. + */ + void *tx_token; + + /** + * Opaque RX token buffer. + * Valid when @ref UCT_EP_ATTR_FIELD_RX_TOKEN is set in @ref field_mask. + * Caller allocates a buffer of @ref uct_iface_attr_v2_t::rx_token_length + * bytes and sets this pointer; callee fills the buffer with the token. + */ + void *rx_token; }; @@ -1035,14 +1055,35 @@ typedef enum { /** * @ingroup UCT_RESOURCE - * @brief Interface attribute fields. + * @brief UCT interface v2 attributes field mask. + * + * The enumeration allows specifying which fields in @ref uct_iface_attr_v2_t + * are present, for backward compatibility support. */ enum uct_iface_attr_field { /** Enables @ref uct_iface_attr_v2_t::max_put_sgl_zcopy_count */ UCT_IFACE_ATTR_FIELD_MAX_PUT_SGL_ZCOPY_COUNT = UCS_BIT(0), /** Enables @ref uct_iface_attr_v2_t::cap */ - UCT_IFACE_ATTR_FIELD_CAP_FLAGS = UCS_BIT(1) + UCT_IFACE_ATTR_FIELD_CAP_FLAGS = UCS_BIT(1), + + /** Enables @ref uct_iface_attr_v2_t::flags (output). + * Returns plugin-contributed capability flags. + */ + UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(2), + + /** Enables @ref uct_iface_attr_v2_t::tx_token_length (output). */ + UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), + + /** Enables @ref uct_iface_attr_v2_t::rx_token_length (output). */ + UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), + + /** + * Enables the RX token derivation path. + * When set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), + * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). + */ + UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(5) }; @@ -1066,12 +1107,12 @@ enum uct_iface_attr_field { /** * @ingroup UCT_RESOURCE - * @brief Interface attributes, used by @ref uct_iface_query_v2. + * @brief UCT interface v2 attributes, used by @ref uct_iface_query_v2. */ typedef struct { /** * Mask of valid fields in this structure, using bits from - * @ref uct_iface_attr_field_t. + * @ref uct_iface_attr_field. */ uint64_t field_mask; @@ -1085,6 +1126,40 @@ typedef struct { struct { uint64_t flags; /**< Flags from @ref UCT_RESOURCE_IFACE_CAP_V2 */ } cap; + + /** + * Plugin-contributed capability flags (bitmask of UCT_IFACE_FLAG_*). + * Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set. + */ + uint64_t flags; + + /** + * Length in bytes of the opaque TX token. + * Valid when @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH is set. + */ + size_t tx_token_length; + + /** + * Length in bytes of the opaque RX token. + * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH is set. + */ + size_t rx_token_length; + + /** + * TX token input buffer. + * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN is set. + * Caller sets this to a buffer of @ref tx_token_length bytes containing + * the TX token received from the sender. + */ + const void *tx_token; + + /** + * RX token output buffer. + * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN is set. + * Caller sets this to a pre-allocated buffer of @ref rx_token_length + * bytes; callee fills it with RX token. + */ + void *rx_token; } uct_iface_attr_v2_t; From e334f0da8c07878e56399f5db2052be8d05c0185 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Wed, 1 Apr 2026 14:13:28 +0300 Subject: [PATCH 02/10] UCT/PLUGIN: add definition in uct_iface_attr_v2_t for uct_iface_query_v2 --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 13eabeda123..5746be62f4e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -36,6 +36,7 @@ Elad Persiko Eugene Voronov Evgeny Leksikov Fabian Ruhland +Fei Teng Gilbert Lee Gilles Gouaillardet Gonzalo Brito Gadeschi From d24a262ae7847c407217d28c2fc79cce43a54717 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Thu, 2 Apr 2026 06:50:07 +0300 Subject: [PATCH 03/10] UCT/PLUGIN: modifications based on comments --- src/uct/api/v2/uct_v2.h | 57 ++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index b4180ec3a43..5ed66bd8e9d 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -425,15 +425,15 @@ struct uct_ep_attr { * Caller allocates a buffer of @ref uct_iface_attr_v2_t::tx_token_length * bytes and sets this pointer; callee fills the buffer with the token. */ - void *tx_token; - - /** - * Opaque RX token buffer. - * Valid when @ref UCT_EP_ATTR_FIELD_RX_TOKEN is set in @ref field_mask. - * Caller allocates a buffer of @ref uct_iface_attr_v2_t::rx_token_length - * bytes and sets this pointer; callee fills the buffer with the token. - */ - void *rx_token; + void *tx_token; + + /** + * Opaque RX token buffer. + * Valid when @ref UCT_EP_ATTR_FIELD_RX_TOKEN is set in @ref field_mask. + * Caller allocates a buffer of @ref uct_iface_attr_v2_t::rx_token_length + * bytes and sets this pointer; callee fills the buffer with the token. + */ + void *rx_token; }; @@ -1074,16 +1074,25 @@ enum uct_iface_attr_field { /** Enables @ref uct_iface_attr_v2_t::tx_token_length (output). */ UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), - + /** Enables @ref uct_iface_attr_v2_t::rx_token_length (output). */ UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), - + + /** + * Enables the RX token derivation path. + * Need to be set together with @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN + * When both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), + * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). + */ + UCT_IFACE_ATTR_FIELD_TX_TOKEN = UCS_BIT(5), + /** * Enables the RX token derivation path. - * When set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), + * Need to be set together with @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN, + * when both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). */ - UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(5) + UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(6) }; @@ -1131,35 +1140,37 @@ typedef struct { * Plugin-contributed capability flags (bitmask of UCT_IFACE_FLAG_*). * Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set. */ - uint64_t flags; - + uint64_t flags; + /** * Length in bytes of the opaque TX token. * Valid when @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH is set. */ - size_t tx_token_length; - + size_t tx_token_length; + /** * Length in bytes of the opaque RX token. * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH is set. */ - size_t rx_token_length; - + size_t rx_token_length; + /** * TX token input buffer. - * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN is set. + * Valid when @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN is set. * Caller sets this to a buffer of @ref tx_token_length bytes containing * the TX token received from the sender. + * @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN must be set together. */ - const void *tx_token; - + const void *tx_token; + /** * RX token output buffer. * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN is set. * Caller sets this to a pre-allocated buffer of @ref rx_token_length * bytes; callee fills it with RX token. + * @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN must be set together. */ - void *rx_token; + void *rx_token; } uct_iface_attr_v2_t; From 3eef092d2bdafffd702cb7cd766e21b93f9831fc Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Thu, 2 Apr 2026 18:23:31 +0300 Subject: [PATCH 04/10] UCT/PLUGIN: modifications for clang-format --- src/uct/api/v2/uct_v2.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index 5ed66bd8e9d..73b1cd75119 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1140,19 +1140,19 @@ typedef struct { * Plugin-contributed capability flags (bitmask of UCT_IFACE_FLAG_*). * Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set. */ - uint64_t flags; + uint64_t flags; /** * Length in bytes of the opaque TX token. * Valid when @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH is set. */ - size_t tx_token_length; + size_t tx_token_length; /** * Length in bytes of the opaque RX token. * Valid when @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH is set. */ - size_t rx_token_length; + size_t rx_token_length; /** * TX token input buffer. @@ -1161,7 +1161,7 @@ typedef struct { * the TX token received from the sender. * @ref UCT_IFACE_ATTR_FIELD_RX_TOKEN must be set together. */ - const void *tx_token; + const void *tx_token; /** * RX token output buffer. @@ -1170,7 +1170,7 @@ typedef struct { * bytes; callee fills it with RX token. * @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN must be set together. */ - void *rx_token; + void *rx_token; } uct_iface_attr_v2_t; From d9dcf583f3d53d0abe88f1b0f2da81b1ded2e6d0 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Fri, 3 Apr 2026 04:54:04 +0300 Subject: [PATCH 05/10] UCT/PLUGIN: update comment for flags in uct_iface_attr_v2_t --- src/uct/api/v2/uct_v2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index 73b1cd75119..971ac7310b5 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1137,7 +1137,7 @@ typedef struct { } cap; /** - * Plugin-contributed capability flags (bitmask of UCT_IFACE_FLAG_*). + * UCT interface v2 flags (bitmask of UCT_IFACE_ATTR_FIELD_*). * Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set. */ uint64_t flags; From 5ed392c2ccf424bc5e6b4c9e5c496736a130a48e Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Wed, 8 Apr 2026 05:11:28 +0300 Subject: [PATCH 06/10] UCT/PLUGIN: update comment for uct_iface_attr_field --- src/uct/api/v2/uct_v2.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index 971ac7310b5..ccf12cb180e 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1061,21 +1061,20 @@ typedef enum { * are present, for backward compatibility support. */ enum uct_iface_attr_field { +<<<<<<< HEAD /** Enables @ref uct_iface_attr_v2_t::max_put_sgl_zcopy_count */ UCT_IFACE_ATTR_FIELD_MAX_PUT_SGL_ZCOPY_COUNT = UCS_BIT(0), /** Enables @ref uct_iface_attr_v2_t::cap */ UCT_IFACE_ATTR_FIELD_CAP_FLAGS = UCS_BIT(1), - /** Enables @ref uct_iface_attr_v2_t::flags (output). - * Returns plugin-contributed capability flags. - */ + /** Enables @ref uct_iface_attr_v2_t::flags. */ UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(2), - /** Enables @ref uct_iface_attr_v2_t::tx_token_length (output). */ + /** Enables @ref uct_iface_attr_v2_t::tx_token_length. */ UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), - /** Enables @ref uct_iface_attr_v2_t::rx_token_length (output). */ + /** Enables @ref uct_iface_attr_v2_t::rx_token_length. */ UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), /** From cb6d193fe17256281efc2a79f84b9bac06502430 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Mon, 8 Jun 2026 06:11:51 +0300 Subject: [PATCH 07/10] UCT/PLUGIN: remove leftover conflict marker --- src/uct/api/v2/uct_v2.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index ccf12cb180e..bf11cb0a92c 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1061,7 +1061,6 @@ typedef enum { * are present, for backward compatibility support. */ enum uct_iface_attr_field { -<<<<<<< HEAD /** Enables @ref uct_iface_attr_v2_t::max_put_sgl_zcopy_count */ UCT_IFACE_ATTR_FIELD_MAX_PUT_SGL_ZCOPY_COUNT = UCS_BIT(0), From 8dc7cd3f6650aa762302cfbc7c7d56f3b6160602 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Tue, 9 Jun 2026 12:02:26 +0300 Subject: [PATCH 08/10] UCT/PLUGIN: format update --- src/uct/api/v2/uct_v2.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index bf11cb0a92c..30a63d9d4a1 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1068,13 +1068,13 @@ enum uct_iface_attr_field { UCT_IFACE_ATTR_FIELD_CAP_FLAGS = UCS_BIT(1), /** Enables @ref uct_iface_attr_v2_t::flags. */ - UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(2), + UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(2), /** Enables @ref uct_iface_attr_v2_t::tx_token_length. */ - UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), + UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), /** Enables @ref uct_iface_attr_v2_t::rx_token_length. */ - UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), + UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), /** * Enables the RX token derivation path. @@ -1082,7 +1082,7 @@ enum uct_iface_attr_field { * When both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). */ - UCT_IFACE_ATTR_FIELD_TX_TOKEN = UCS_BIT(5), + UCT_IFACE_ATTR_FIELD_TX_TOKEN = UCS_BIT(5), /** * Enables the RX token derivation path. @@ -1090,7 +1090,7 @@ enum uct_iface_attr_field { * when both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). */ - UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(6) + UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(6) }; From af1eb489e9a240fb9e26d1716da85cdda9b1d1b7 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Wed, 10 Jun 2026 10:14:12 +0300 Subject: [PATCH 09/10] UCT/PLUGIN: remove duplicate flag definition --- src/uct/api/v2/uct_v2.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/uct/api/v2/uct_v2.h b/src/uct/api/v2/uct_v2.h index 30a63d9d4a1..f2588d73179 100644 --- a/src/uct/api/v2/uct_v2.h +++ b/src/uct/api/v2/uct_v2.h @@ -1067,14 +1067,11 @@ enum uct_iface_attr_field { /** Enables @ref uct_iface_attr_v2_t::cap */ UCT_IFACE_ATTR_FIELD_CAP_FLAGS = UCS_BIT(1), - /** Enables @ref uct_iface_attr_v2_t::flags. */ - UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(2), - /** Enables @ref uct_iface_attr_v2_t::tx_token_length. */ - UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(3), + UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(2), /** Enables @ref uct_iface_attr_v2_t::rx_token_length. */ - UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(4), + UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(3), /** * Enables the RX token derivation path. @@ -1082,7 +1079,7 @@ enum uct_iface_attr_field { * When both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). */ - UCT_IFACE_ATTR_FIELD_TX_TOKEN = UCS_BIT(5), + UCT_IFACE_ATTR_FIELD_TX_TOKEN = UCS_BIT(4), /** * Enables the RX token derivation path. @@ -1090,7 +1087,7 @@ enum uct_iface_attr_field { * when both set, @ref uct_iface_attr_v2_t::tx_token is input (from sender), * and @ref uct_iface_attr_v2_t::rx_token is output (derived by receiver). */ - UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(6) + UCT_IFACE_ATTR_FIELD_RX_TOKEN = UCS_BIT(5) }; @@ -1134,12 +1131,6 @@ typedef struct { uint64_t flags; /**< Flags from @ref UCT_RESOURCE_IFACE_CAP_V2 */ } cap; - /** - * UCT interface v2 flags (bitmask of UCT_IFACE_ATTR_FIELD_*). - * Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set. - */ - uint64_t flags; - /** * Length in bytes of the opaque TX token. * Valid when @ref UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH is set. From d35be97383c1b60a77e01daf480e3f8d9e28a593 Mon Sep 17 00:00:00 2001 From: Fei Teng Date: Wed, 10 Jun 2026 12:03:13 +0300 Subject: [PATCH 10/10] UCT/PLUGIN: set token_length to 0 in uct_iface_base_query_v2 --- src/uct/base/uct_iface.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/uct/base/uct_iface.c b/src/uct/base/uct_iface.c index 96e38bcbaa9..4ac66020b73 100644 --- a/src/uct/base/uct_iface.c +++ b/src/uct/base/uct_iface.c @@ -573,6 +573,18 @@ ucs_status_t uct_single_device_resource(uct_md_h md, const char *dev_name, ucs_status_t uct_iface_base_query_v2(uct_iface_h iface, uct_iface_attr_v2_t *iface_attr) { + uint64_t tx_token_mask = iface_attr->field_mask & UCT_IFACE_ATTR_FIELD_TX_TOKEN; + uint64_t rx_token_mask = iface_attr->field_mask & UCT_IFACE_ATTR_FIELD_RX_TOKEN; + int token_pair_set = 0; + if (tx_token_mask ^ rx_token_mask) { + ucs_error("invalid field_mask: TX/RX token fields must be set together"); + return UCS_ERR_INVALID_PARAM; + } else if (tx_token_mask && rx_token_mask) { + iface_attr->tx_token_length = 0; + iface_attr->rx_token_length = 0; + token_pair_set = 1; + } + if (iface_attr->field_mask & UCT_IFACE_ATTR_FIELD_CAP_FLAGS) { iface_attr->cap.flags = 0; } @@ -581,6 +593,14 @@ uct_iface_base_query_v2(uct_iface_h iface, uct_iface_attr_v2_t *iface_attr) iface_attr->max_put_sgl_zcopy_count = 0; } + if (!token_pair_set && iface_attr->field_mask & UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH) { + iface_attr->tx_token_length = 0; + } + + if (!token_pair_set && iface_attr->field_mask & UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH) { + iface_attr->rx_token_length = 0; + } + return UCS_OK; }