Skip to main content

IRxQueue

Trait IRxQueue 

Source
pub trait IRxQueue: Send + 'static {
    // Required methods
    fn id(&self) -> usize;
    fn config(&self) -> QueueConfig;
    fn submit(&mut self, buffer: DmaBuffer) -> Result<(), NetError>;
    fn reclaim(&mut self) -> Option<(u64, usize)>;
}
Expand description

Receive queue interface.

A driver creates one or more RX queues via Interface::create_rx_queue and exchanges DMA buffer bus addresses with the caller.

Required Methods§

Source

fn id(&self) -> usize

Queue identifier (unique within the device).

Source

fn config(&self) -> QueueConfig

DMA buffer configuration for this queue.

Source

fn submit(&mut self, buffer: DmaBuffer) -> Result<(), NetError>

Submit an empty DMA buffer to hardware.

bus_addr must point to a DMA-capable buffer whose total size is len.

Source

fn reclaim(&mut self) -> Option<(u64, usize)>

Reclaim the next completed receive buffer.

Returns the buffer bus address and the received byte count.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§