|
MXL : Media eXchange Layer
MXL
|
A single endpoint within an RDMInitiator. More...
#include <RDMInitiator.hpp>

Classes | |
| struct | Activated |
| The endpoint activated state. More... | |
| struct | Done |
| The endpoint is done and can be evicted from the initiator. More... | |
| struct | Idle |
| The idle state. More... | |
| struct | Removing |
| The removing state. More... | |
Public Member Functions | |
| void | activate (Endpoint &ep) |
| Try to activate the endpoint. | |
| bool | canEvict () const noexcept |
| Returns true if the target was shut down and can be evicted from the initiator. | |
| void | finishRemoval (Endpoint &ep) |
| Complete the removal once all outstanding writes have completed or RemoveTimeout has elapsed. | |
| void | handleCompletion (Endpoint &ep, Completion completion) |
| Handle a completion event for this endpoint. | |
| bool | hasPendingWork () const noexcept |
| Returns true if there's pending work for this target. | |
| bool | isIdle () const noexcept |
| Returns true if the endpoint is idle and could be actived. | |
| RDMInitiatorTarget (std::unique_ptr< EgressProtocol > proto, TargetInfo remoteInfo) | |
| Construct a new RDMInitiatorEndpoint object. | |
| void | shutdown (Endpoint &ep) |
| Stop transfers to this target. | |
| void | transferGrain (Endpoint const &ep, std::uint64_t localIndex, std::uint64_t remoteIndex, std::uint64_t remotePayloadOffset, SliceRange const &sliceRange) |
| Post a grain data transfer request to this endpoint. | |
| void | transferSamples (Endpoint const &ep, std::uint64_t headIndex, std::size_t count) |
| Post a sample data transfer request to this endpoint. | |
Static Public Attributes | |
| static constexpr auto | RemoveTimeout = std::chrono::seconds(2) |
| Upper bound for the removing state. A target that disappears may never complete the outstanding writes. | |
Private Types | |
| using | State = std::variant<Idle, Activated, Removing, Done> |
| The various states that the endpoint can be in are stored inside a variant that we move from and then back into when processing events. | |
Private Attributes | |
| std::unique_ptr< EgressProtocol > | _proto |
| TargetInfo | _remoteInfo |
| State | _state |
A single endpoint within an RDMInitiator.
Definition at line 23 of file RDMInitiator.hpp.
|
private |
The various states that the endpoint can be in are stored inside a variant that we move from and then back into when processing events.
Definition at line 123 of file RDMInitiator.hpp.
| mxl::lib::fabrics::ofi::RDMInitiatorTarget::RDMInitiatorTarget | ( | std::unique_ptr< EgressProtocol > | proto, |
| TargetInfo | remoteInfo ) |
Construct a new RDMInitiatorEndpoint object.
| ep | The endpoint to use for posting transfers. |
| addr | The fabric address of the remote endpoint. |
| regions | The remote memory regions to transfer data to. |
Definition at line 35 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::activate | ( | Endpoint & | ep | ) |
Try to activate the endpoint.
The endpoint is activated by adding the remote address to the address vector.
Definition at line 46 of file RDMInitiator.cpp.
|
nodiscardnoexcept |
Returns true if the target was shut down and can be evicted from the initiator.
Definition at line 110 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::finishRemoval | ( | Endpoint & | ep | ) |
Complete the removal once all outstanding writes have completed or RemoveTimeout has elapsed.
Removes the address vector entry and moves the target to the done state. In any other state than the removing state, this is a no-op.
Definition at line 88 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::handleCompletion | ( | Endpoint & | ep, |
| Completion | completion ) |
Handle a completion event for this endpoint.
Definition at line 144 of file RDMInitiator.cpp.
|
nodiscardnoexcept |
Returns true if there's pending work for this target.
Definition at line 132 of file RDMInitiator.cpp.
|
nodiscardnoexcept |
Returns true if the endpoint is idle and could be actived.
Definition at line 41 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::shutdown | ( | Endpoint & | ep | ) |
Stop transfers to this target.
If writes are still outstanding, the target goes to the removing state. It keeps its address vector entry and its protocol instance until finishRemoval() finds that the writes have completed. Otherwise the address vector entry is removed right away and the target can be evicted.
Definition at line 62 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::transferGrain | ( | Endpoint const & | ep, |
| std::uint64_t | localIndex, | ||
| std::uint64_t | remoteIndex, | ||
| std::uint64_t | remotePayloadOffset, | ||
| SliceRange const & | sliceRange ) |
Post a grain data transfer request to this endpoint.
Definition at line 115 of file RDMInitiator.cpp.
| void mxl::lib::fabrics::ofi::RDMInitiatorTarget::transferSamples | ( | Endpoint const & | ep, |
| std::uint64_t | headIndex, | ||
| std::size_t | count ) |
Post a sample data transfer request to this endpoint.
Definition at line 124 of file RDMInitiator.cpp.
|
private |
Definition at line 127 of file RDMInitiator.hpp.
|
private |
Definition at line 129 of file RDMInitiator.hpp.
|
private |
The current state of the endpoint.
Definition at line 126 of file RDMInitiator.hpp.
|
staticconstexpr |
Upper bound for the removing state. A target that disappears may never complete the outstanding writes.
Definition at line 67 of file RDMInitiator.hpp.