Skip to main content

ITxQueue

Trait ITxQueue 

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

Transmit queue interface.

A driver creates one or more TX queues via Interface::create_tx_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, bus_addr: u64, len: usize) -> Result<(), NetError>

Submit a DMA buffer for transmission.

bus_addr must point to a DMA-capable buffer whose first len bytes contain the packet to be transmitted.

Source

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

Reclaim the next completed transmit buffer.

Returns the buffer bus address when the device has completed sending it.

Implementors§