pub struct IbvBackend<I: IbvDeviceImpl>(pub ActorHandle<IbvManagerActor<I>>);Expand description
Wrapper around ActorHandle<IbvManagerActor<I>> that moves the RDMA
data-plane (post send/recv, poll CQ) off the actor loop while keeping
state-mutating operations (MR registration/deregistration, QP management)
serialized through actor messages.
Tuple Fields§
§0: ActorHandle<IbvManagerActor<I>>Methods from Deref<Target = ActorHandle<IbvManagerActor<I>>>§
Sourcepub fn actor_addr(&self) -> &ActorAddr
pub fn actor_addr(&self) -> &ActorAddr
The ActorAddr of the actor represented by this handle.
Sourcepub fn drain_and_stop(&self, reason: &str) -> Result<(), ActorError>
pub fn drain_and_stop(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to drain its current messages and then stop.
Sourcepub fn stop(&self, reason: &str) -> Result<(), ActorError>
pub fn stop(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to stop without draining ordinary queued work first.
Sourcepub fn kill(&self, reason: &str) -> Result<(), ActorError>
pub fn kill(&self, reason: &str) -> Result<(), ActorError>
Signal the actor to terminate immediately.
Sourcepub fn status(&self) -> Receiver<ActorStatus>
pub fn status(&self) -> Receiver<ActorStatus>
A watch that observes the lifecycle state of the actor.
Sourcepub fn port<M>(&self) -> PortHandle<M>
pub fn port<M>(&self) -> PortHandle<M>
Return a port for the provided message type handled by the actor.
Sourcepub fn try_post<C, M>(
&self,
cx: &C,
message: M,
) -> Result<(), MailboxSenderError>
pub fn try_post<C, M>( &self, cx: &C, message: M, ) -> Result<(), MailboxSenderError>
Post message to this actor’s handler port for M, returning an error
if delivery fails (the actor has stopped, its mailbox is closed, or the
underlying channel is disconnected). Unlike Endpoint::post, the
caller observes the failure instead of having it reported through the
actor’s lost-message channel.
Trait Implementations§
Source§impl<I: IbvDeviceImpl> Clone for IbvBackend<I>
impl<I: IbvDeviceImpl> Clone for IbvBackend<I>
Source§impl<I: Debug + IbvDeviceImpl> Debug for IbvBackend<I>
impl<I: Debug + IbvDeviceImpl> Debug for IbvBackend<I>
Source§impl<I: IbvDeviceImpl> Deref for IbvBackend<I>
impl<I: IbvDeviceImpl> Deref for IbvBackend<I>
Source§type Target = ActorHandle<IbvManagerActor<I>>
type Target = ActorHandle<IbvManagerActor<I>>
Source§impl<I: IbvDeviceImpl> RdmaBackend for IbvBackend<I>where
RdmaRemoteBuffer: ResolveRemoteBackendContext<IbvBackend<I>>,
impl<I: IbvDeviceImpl> RdmaBackend for IbvBackend<I>where
RdmaRemoteBuffer: ResolveRemoteBackendContext<IbvBackend<I>>,
Source§fn submit<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
ops: Vec<RdmaOp>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
ops: Vec<RdmaOp>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Submit a batch of RDMA operations.
Translates each op to an IbvOp, then ships the whole batch to
IbvManagerActor via [SubmitOps]. The manager interleaves
local-MR resolution with per-op dispatch: each op is sent to its
[QueuePairActor] as a one-item [ProcessOps] the moment its MR
is ready, so QP work on op i overlaps MR registration for op
i+1.
Always waits for exactly ops.len() per-op replies before
returning. Per-op failures are collected and formatted into a single
multi-line Err listing each op_idx and its error message.
Source§type RemoteBackendContext = IbvRemoteBackendContext<I>
type RemoteBackendContext = IbvRemoteBackendContext<I>
Source§type TransportInfo = ()
type TransportInfo = ()
Source§fn available() -> bool
fn available() -> bool
Source§fn transport_level(&self) -> RdmaTransportLevel
fn transport_level(&self) -> RdmaTransportLevel
Source§fn transport_info(&self) -> Option<Self::TransportInfo>
fn transport_info(&self) -> Option<Self::TransportInfo>
Source§fn spawn<'life0, 'life1, 'async_trait>(
cx: &'life0 (impl 'async_trait + Actor + Send + Sync),
config: &'life1 RdmaConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spawn<'life0, 'life1, 'async_trait>(
cx: &'life0 (impl 'async_trait + Actor + Send + Sync),
config: &'life1 RdmaConfig,
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
cx and return its handle.Source§fn register_remote_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
local: KeepaliveLocalMemory,
) -> Pin<Box<dyn Future<Output = Result<IbvRemoteBackendContext<I>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_remote_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
local: KeepaliveLocalMemory,
) -> Pin<Box<dyn Future<Output = Result<IbvRemoteBackendContext<I>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
local for remote access and return its wire context.Source§fn release_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn release_buffer<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor + Send + Sync),
remote_buf_id: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl<I> Freeze for IbvBackend<I>
impl<I> !RefUnwindSafe for IbvBackend<I>
impl<I> Send for IbvBackend<I>
impl<I> Sync for IbvBackend<I>
impl<I> Unpin for IbvBackend<I>
impl<I> UnsafeUnpin for IbvBackend<I>
impl<I> !UnwindSafe for IbvBackend<I>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].