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, buffer: DmaBuffer) -> 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, buffer: DmaBuffer) -> 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.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§