pub struct TransportArena { /* private fields */ }Expand description
Addresses of both rings, the checkpoint mailbox, and pools in one fixed arena.
The G2H ring begins at the arena base. The H2G ring is descriptor aligned.
The mailbox is u64 aligned. Both pools are page aligned.
+----------+-----+----------+-----+-----+-----+----------+----------+
| G2H ring | pad | H2G ring | pad | mbx | pad | G2H pool | H2G pool |
+----------+-----+----------+-----+-----+-----+----------+----------+Implementations§
Source§impl TransportArena
impl TransportArena
Sourcepub fn new(base_addr: u64, g2h: QueueDims, h2g: QueueDims) -> Option<Self>
pub fn new(base_addr: u64, g2h: QueueDims, h2g: QueueDims) -> Option<Self>
Derive one transport arena from its base address and queue dimensions.
Sourcepub const fn g2h_ring_addr(&self) -> u64
pub const fn g2h_ring_addr(&self) -> u64
Address of the G2H ring.
Sourcepub const fn h2g_ring_addr(&self) -> u64
pub const fn h2g_ring_addr(&self) -> u64
Address of the H2G ring.
Sourcepub const fn mbx_offset(&self) -> usize
pub const fn mbx_offset(&self) -> usize
Byte offset of the snapshot checkpoint mailbox from the arena base.
Sourcepub const fn g2h_pool_addr(&self) -> u64
pub const fn g2h_pool_addr(&self) -> u64
Address of the G2H pool.
Sourcepub const fn h2g_pool_addr(&self) -> u64
pub const fn h2g_pool_addr(&self) -> u64
Address of the H2G pool.
Sourcepub const fn ring_span_len(&self) -> usize
pub const fn ring_span_len(&self) -> usize
Page-aligned length occupied by both rings and the mailbox.
Trait Implementations§
Source§impl Clone for TransportArena
impl Clone for TransportArena
impl Copy for TransportArena
Source§impl Debug for TransportArena
impl Debug for TransportArena
impl Eq for TransportArena
Source§impl PartialEq for TransportArena
impl PartialEq for TransportArena
impl StructuralPartialEq for TransportArena
Auto Trait Implementations§
impl Freeze for TransportArena
impl RefUnwindSafe for TransportArena
impl Send for TransportArena
impl Sync for TransportArena
impl Unpin for TransportArena
impl UnsafeUnpin for TransportArena
impl UnwindSafe for TransportArena
Blanket Implementations§
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
Mutably borrows from an owned value. Read more