Struct nic_queues::TxQueue
source · pub struct TxQueue<S: TxQueueRegisters, T: TxDescriptor> {
pub id: u8,
pub regs: S,
pub tx_descs: BorrowedSliceMappedPages<T, Mutable>,
pub num_tx_descs: u16,
pub tx_cur: u16,
pub cpu_id: Option<CpuId>,
}
Expand description
A struct that holds all information for a transmit queue. There should be one such object per queue.
Fields§
§id: u8
The number of the queue, stored here for our convenience.
regs: S
Registers for this transmit queue
tx_descs: BorrowedSliceMappedPages<T, Mutable>
Transmit descriptors
num_tx_descs: u16
The number of transmit descriptors in the descriptor ring
tx_cur: u16
Current transmit descriptor index
cpu_id: Option<CpuId>
The cpu which this queue is mapped to. This in itself doesn’t guarantee anything but we use this value when setting the cpu id for interrupts and DCA.
Implementations§
source§impl<S: TxQueueRegisters, T: TxDescriptor> TxQueue<S, T>
impl<S: TxQueueRegisters, T: TxDescriptor> TxQueue<S, T>
sourcepub fn send_on_queue(&mut self, transmit_buffer: TransmitBuffer)
pub fn send_on_queue(&mut self, transmit_buffer: TransmitBuffer)
Sends a packet on the transmit queue
Arguments:
transmit_buffer
: buffer containing the packet to be sent
Auto Trait Implementations§
impl<S, T> RefUnwindSafe for TxQueue<S, T>where S: RefUnwindSafe, T: RefUnwindSafe,
impl<S, T> Send for TxQueue<S, T>where S: Send, T: Send,
impl<S, T> Sync for TxQueue<S, T>where S: Sync, T: Sync,
impl<S, T> Unpin for TxQueue<S, T>where S: Unpin, T: Unpin,
impl<S, T> UnwindSafe for TxQueue<S, T>where S: UnwindSafe, T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more