Skip to main content

MultiChannel

Struct MultiChannel 

Source
pub struct MultiChannel { /* private fields */ }
Expand description

A set of Channels to different peers, sharing a single ProtectionDomain.

Each peer is identified by its index. Operations are routed to the correct channel based on the peer index in the work request.

Use ProtectionDomain::create_multi_channel or MultiChannel::builder to construct one.

Implementations§

Source§

impl MultiChannel

Source

pub fn builder<'f1>() -> MultiChannelBuilder<'f1>

Source§

impl MultiChannel

Source

pub fn send<'op>( &'op mut self, wr: PeerSendWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts a send to the work request’s target peer and blocks until it completes.

Source

pub fn receive<'op>( &'op mut self, wr: PeerReceiveWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts a receive to the work request’s target peer and blocks until it completes.

Source

pub fn write<'op>( &'op mut self, wr: PeerWriteWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts an RDMA write to the work request’s target peer and blocks until it completes.

Source

pub fn read<'op>( &'op mut self, wr: PeerReadWorkRequest<'op, 'op>, ) -> TransportResult<WorkSuccess>

Posts an RDMA read to the work request’s target peer and blocks until it completes.

Source§

impl MultiChannel

Source

pub unsafe fn send_unpolled<'data>( &mut self, wr: PeerSendWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts a send to the target peer without polling for completion.

§Safety

See Channel::send_unpolled.

Source

pub unsafe fn receive_unpolled<'data>( &mut self, wr: PeerReceiveWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts a receive to the target peer without polling for completion.

§Safety

See Channel::receive_unpolled.

Source

pub unsafe fn write_unpolled<'data>( &mut self, wr: PeerWriteWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts an RDMA write to the target peer without polling for completion.

§Safety

See Channel::write_unpolled.

Source

pub unsafe fn read_unpolled<'data>( &mut self, wr: PeerReadWorkRequest<'_, 'data>, ) -> IbvResult<PendingWork<'data>>

Posts an RDMA read to the target peer without polling for completion.

§Safety

See Channel::read_unpolled.

Source§

impl MultiChannel

Source

pub fn scatter_send<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerSendWorkRequest<'op, 'op>>,

Posts sends to multiple peers and blocks until all complete.

Source

pub fn scatter_write<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerWriteWorkRequest<'op, 'op>>,

Posts RDMA writes to multiple peers and blocks until all complete.

Source

pub fn gather_receive<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerReceiveWorkRequest<'op, 'op>>,

Posts receives from multiple peers and blocks until all complete.

Source

pub fn gather_read<'op, I>( &'op mut self, wrs: I, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = PeerReadWorkRequest<'op, 'op>>,

Posts RDMA reads from multiple peers and blocks until all complete.

Source

pub fn multicast_send<'op, I>( &'op mut self, peers: I, wr: SendWorkRequest<'op, 'op>, ) -> TransportResult<Vec<WorkSuccess>>
where I: IntoIterator<Item = usize>,

Posts the same send to multiple peers and blocks until all complete.

Source§

impl MultiChannel

Source

pub unsafe fn scatter_send_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerSendWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts sends to multiple peers without polling for completion.

§Safety

See Channel::send_unpolled.

Source

pub unsafe fn scatter_write_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerWriteWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts RDMA writes to multiple peers without polling for completion.

§Safety

See Channel::write_unpolled.

Source

pub unsafe fn gather_receive_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerReceiveWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts receives from multiple peers without polling for completion.

§Safety

See Channel::receive_unpolled.

Source

pub unsafe fn gather_read_unpolled<'wr, 'data, I>( &mut self, wrs: I, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = PeerReadWorkRequest<'wr, 'data>>, 'data: 'wr,

Posts RDMA reads from multiple peers without polling for completion.

§Safety

See Channel::read_unpolled.

Source

pub unsafe fn multicast_send_unpolled<'wr, 'data, I>( &mut self, peers: I, wr: SendWorkRequest<'wr, 'data>, ) -> IbvResult<Vec<PendingWork<'data>>>
where I: IntoIterator<Item = usize>,

Posts the same send to multiple peers without polling for completion.

§Safety

See Channel::send_unpolled.

Source§

impl MultiChannel

Source

pub fn scope<'env, F, T, E>(&'env mut self, f: F) -> Result<T, ScopeError<E>>
where F: for<'scope> FnOnce(&mut PollingScope<'scope, 'env, MultiChannel>) -> Result<T, E>,

Opens a polling scope that automatically polls all outstanding work requests when it ends.

See Channel::scope for details on the scoping mechanism.

Source

pub fn manual_scope<'env, F, T, E>(&'env mut self, f: F) -> Result<T, E>
where F: for<'scope> FnOnce(&mut PollingScope<'scope, 'env, MultiChannel>) -> Result<T, E>,

Opens a polling scope that enforces manual polling of all work requests.

See Channel::manual_scope for details.

Source§

impl MultiChannel

Source

pub fn num_channels(&self) -> usize

Returns the number of peer channels.

Source

pub fn pd(&self) -> &ProtectionDomain

Returns a reference to the shared ProtectionDomain.

Trait Implementations§

Source§

impl Debug for MultiChannel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.