Class TransportSession¶
Defined in File Transport.hpp
Inheritance Relationships¶
Derived Types¶
public catalyst::transport::ControllerSession(Class ControllerSession)public catalyst::transport::CoprocessorSession(Class CoprocessorSession)
Class Documentation¶
-
class TransportSession¶
Stateful transport session shared by the controller and coprocessor roles.
Methods must be called in this order:
connect - bring up QPs + the out-of-band channel
alloc_memory - register the region (needs the connected context)
exchange_keys - swap region handles over the out-of-band channel
establish_channel - program the channel from the local + peer regions
(coprocessor) set_coprocessor_fn before start()
start / collect / stop
Subclassed by catalyst::transport::ControllerSession, catalyst::transport::CoprocessorSession
Public Functions
-
virtual ~TransportSession() = default¶
-
virtual int connect(const ConnectInfo &info) = 0¶
Bring up the connection (out-of-band handshake and QP transition to RTS).
- Parameters:
info – Peer address and out-of-band port.
- Returns:
int
-
virtual MemRegion alloc_memory(std::size_t size, MemKind kind) = 0¶
Allocate and register a memory region on the device.
- Parameters:
size – Size of the region in bytes.
kind – Memory kind selecting the allocation and registration path.
- Returns:
MemRegionThe allocated and registered region.
-
virtual PeerRef exchange_keys(const MemRegion &local) = 0¶
Advertise a local region and receive the peer’s region over the out-of-band channel.
- Parameters:
local – The local region to advertise.
- Returns:
PeerRefThe peer’s advertised region.
-
virtual void establish_channel(const ChannelDesc &desc, const MemRegion &local, const PeerRef &peer) = 0¶
Program the data movement this session will run (single channel per session).
- Parameters:
desc – Channel configuration.
local – The local memory region.
peer – The peer’s memory region.
-
virtual int collect(void *const *replies, const std::uint64_t *replies_bytes, std::size_t n) = 0¶
Wait for a result and scatter it into the reply buffers.
- Parameters:
replies – Array of
nbuffers to write the results into.replies_bytes – Array of
ncapacities (bytes), one per reply buffer.n – Number of reply buffers.
- Returns:
int
-
virtual void stop() = 0¶
Stop the engine and join. Idempotent.
-
inline virtual std::uint64_t last_rtt_ns() const¶
Last round-trip time, in nanoseconds (for testing purposes).
- Returns:
std::uint64_t