-
Notifications
You must be signed in to change notification settings - Fork 540
UCT/PLUGIN: add definition in uct_iface_attr_v2_t for uct_iface_query_v2 #11316
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
Open
fteng-NV
wants to merge
6
commits into
openucx:master
Choose a base branch
from
fteng-NV:feature/uct-api-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+89
−7
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9c4fccf
UCT/PLUGIN: add definition in uct_iface_attr_v2_t for uct_iface_query_v2
fteng-NV a6b8374
UCT/PLUGIN: add definition in uct_iface_attr_v2_t for uct_iface_query_v2
fteng-NV 47c652c
UCT/PLUGIN: modifications based on comments
fteng-NV 74a60e6
UCT/PLUGIN: modifications for clang-format
fteng-NV 0028fd6
UCT/PLUGIN: update comment for flags in uct_iface_attr_v2_t
fteng-NV eb549d4
UCT/PLUGIN: update comment for uct_iface_attr_field
fteng-NV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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,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. | ||
| */ | ||
| 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
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. Why "Plugin-contributed"? maybe return all supported capabilities?
Author
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. 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; | ||
|
|
||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why plugin?
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.
updated in eb549d4