pub struct SplitQueue { /* private fields */ }Expand description
Single-owner, bounded split-virtqueue reference model.
Configuration preallocates descriptor, available, used, and ownership tables. Publication, consumption, completion, notification control, and reset perform no allocation or payload copy.
Implementations§
Source§impl SplitQueue
impl SplitQueue
Sourcepub fn new(
max_size: QueueSize,
max_chain_descriptors: u16,
) -> Result<Self, SplitQueueInitError>
pub fn new( max_size: QueueSize, max_chain_descriptors: u16, ) -> Result<Self, SplitQueueInitError>
Construct an unconfigured queue.
Sourcepub const fn max_chain_descriptors(&self) -> u16
pub const fn max_chain_descriptors(&self) -> u16
Maximum flattened descriptor count accepted by normal publication.
Sourcepub fn inject_available(
&mut self,
chain: DriverChain,
) -> Result<PublishedChain, PublishError<DriverChain, SplitQueueError>>
pub fn inject_available( &mut self, chain: DriverChain, ) -> Result<PublishedChain, PublishError<DriverChain, SplitQueueError>>
Inject a raw chain into the available ring, retaining malformed topology for device tests.
This differs from DriverQueue::publish only by bypassing profile validation. Descriptor
table and available-ring capacity checks still apply.
Sourcepub fn set_empty_ring_index(
&mut self,
index: u16,
) -> Result<(), QueueError<SplitQueueError>>
pub fn set_empty_ring_index( &mut self, index: u16, ) -> Result<(), QueueError<SplitQueueError>>
Set all four ring indices while the configured queue owns no chains.
Sourcepub fn set_next_descriptor(
&mut self,
index: u16,
) -> Result<(), QueueError<SplitQueueError>>
pub fn set_next_descriptor( &mut self, index: u16, ) -> Result<(), QueueError<SplitQueueError>>
Select the descriptor index at which the next bounded allocation scan begins.
Sourcepub fn ring_counters(&self) -> Option<RingCounters>
pub fn ring_counters(&self) -> Option<RingCounters>
Return ring counters when storage is configured.
Sourcepub fn free_descriptors(&self) -> Option<u16>
pub fn free_descriptors(&self) -> Option<u16>
Return the number of currently free descriptor-table entries.