Struct virtio_queue::QueueState
source · pub struct QueueState {
pub max_size: u16,
pub next_avail: u16,
pub next_used: u16,
pub event_idx_enabled: bool,
pub size: u16,
pub ready: bool,
pub desc_table: u64,
pub avail_ring: u64,
pub used_ring: u64,
}Expand description
Representation of the Queue state.
The QueueState represents the pure state of the queue without tracking any implementation
details of the queue. The goal with this design is to minimize the changes required to the
state, and thus the required transitions between states when upgrading or downgrading.
In practice this means that the QueueState consists solely of POD (Plain Old Data).
As this structure has all the fields public it is consider to be untrusted. A validated
queue can be created from the state by calling the associated try_from function.
Fields
max_size: u16The maximum size in elements offered by the device.
next_avail: u16Tail position of the available ring.
next_used: u16Head position of the used ring.
event_idx_enabled: boolVIRTIO_F_RING_EVENT_IDX negotiated.
size: u16The queue size in elements the driver selected.
ready: boolIndicates if the queue is finished with configuration.
desc_table: u64Guest physical address of the descriptor table.
avail_ring: u64Guest physical address of the available ring.
used_ring: u64Guest physical address of the used ring.
Trait Implementations
sourceimpl Clone for QueueState
impl Clone for QueueState
sourcefn clone(&self) -> QueueState
fn clone(&self) -> QueueState
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more