pub struct RingAddresses {
pub descriptors: u64,
pub available: u64,
pub used: u64,
}Expand description
Where a driver put a queue’s three parts, as device addresses: what it writes to the transport’s descriptor, driver and device area registers.
Fields§
§descriptors: u64The descriptor table.
available: u64The available ring, which the driver writes.
used: u64The used ring, which the device writes.
Implementations§
Source§impl RingAddresses
impl RingAddresses
Sourcepub const fn descriptor_table_bytes(size: QueueSize) -> u64
pub const fn descriptor_table_bytes(size: QueueSize) -> u64
Bytes of descriptor table a queue of size has.
Sourcepub const fn available_ring_bytes(size: QueueSize) -> u64
pub const fn available_ring_bytes(size: QueueSize) -> u64
Bytes of available ring a queue of size has. The trailing
used_event word exists only with event indices, which this profile
does not negotiate.
Sourcepub const fn used_ring_bytes(size: QueueSize) -> u64
pub const fn used_ring_bytes(size: QueueSize) -> u64
Bytes of used ring a queue of size has.
Sourcepub const fn contiguous(base: u64, size: QueueSize) -> Option<(Self, u64)>
pub const fn contiguous(base: u64, size: QueueSize) -> Option<(Self, u64)>
The three parts one after another from base, each aligned as §2.7
requires, and the bytes the whole takes. None when base is not
aligned for a descriptor table or the queue would wrap the address
space.
Trait Implementations§
Source§impl Clone for RingAddresses
impl Clone for RingAddresses
impl Copy for RingAddresses
Source§impl Debug for RingAddresses
impl Debug for RingAddresses
Source§impl Default for RingAddresses
impl Default for RingAddresses
impl Eq for RingAddresses
Source§impl PartialEq for RingAddresses
impl PartialEq for RingAddresses
impl StructuralPartialEq for RingAddresses
Auto Trait Implementations§
impl Freeze for RingAddresses
impl RefUnwindSafe for RingAddresses
impl Send for RingAddresses
impl Sync for RingAddresses
impl Unpin for RingAddresses
impl UnsafeUnpin for RingAddresses
impl UnwindSafe for RingAddresses
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