Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Elad Persiko <eladpe@mellanox.com>
Eugene Voronov <eugene@mellanox.com>
Evgeny Leksikov <evgenylek@mellanox.com>
Fabian Ruhland <ruhland@hhu.de>
Fei Teng <fteng@nvidia.com>
Gilbert Lee <gilbert.lee@amd.com>
Gilles Gouaillardet <gilles.gouaillardet@gmail.com>
Gonzalo Brito Gadeschi <gonzalob@nvidia.com>
Expand Down
97 changes: 90 additions & 7 deletions src/uct/api/v2/uct_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};


Expand Down Expand Up @@ -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;
};


Expand Down Expand Up @@ -1035,24 +1055,87 @@ 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 {
/* Reserved for future use */
UCT_IFACE_ATTR_FIELD_RESERVED = 0
/** Enables @ref uct_iface_attr_v2_t::flags (output).
* Returns plugin-contributed capability flags.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why plugin?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in eb549d4

*/
UCT_IFACE_ATTR_FIELD_FLAGS = UCS_BIT(0),

/** Enables @ref uct_iface_attr_v2_t::tx_token_length (output). */
UCT_IFACE_ATTR_FIELD_TX_TOKEN_LENGTH = UCS_BIT(1),

/** Enables @ref uct_iface_attr_v2_t::rx_token_length (output). */
UCT_IFACE_ATTR_FIELD_RX_TOKEN_LENGTH = UCS_BIT(2),

/**
* 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(3),

/**
* Enables the RX token derivation path.
* 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(4)
};


/**
* @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;
uint64_t field_mask;

/**
* Plugin-contributed capability flags (bitmask of UCT_IFACE_FLAG_*).
* Valid when @ref UCT_IFACE_ATTR_FIELD_FLAGS is set.
*/
uint64_t flags;
Comment on lines +1102 to +1106
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "Plugin-contributed"? maybe return all supported capabilities?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modify comment in 0028fd6


/**
* 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_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;

/**
* 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;
} uct_iface_attr_v2_t;


Expand Down
Loading