#[repr(C)]pub struct AdvancedTxDescriptor {
pub packet_buffer_address: Volatile<u64>,
pub data_len: Volatile<u16>,
pub dtyp_mac_rsv: Volatile<u8>,
pub dcmd: Volatile<u8>,
pub paylen_popts_cc_idx_sta: Volatile<u32>,
}Expand description
Advanced Transmit Descriptor used by the ixgbe NIC driver.
§Two usage modes
It has 2 modes: Read and Write Back, both of which use the whole 128 bits. There is one transmit descriptor per transmit buffer; it can be converted between these 2 modes.
Read contains the addresses that the driver writes. Write Back contains information the hardware writes on receiving a packet.
More information can be found in the 82599 datasheet.
Fields§
§packet_buffer_address: Volatile<u64>Starting physical address of the receive buffer for the packet.
data_len: Volatile<u16>Length of data buffer
dtyp_mac_rsv: Volatile<u8>A multi-part field:
dtyp: Descriptor Type, occupies bits[7:4],mac: options to apply LinkSec and time stamp, occupies bits[3:2].
dcmd: Volatile<u8>Command bits
paylen_popts_cc_idx_sta: Volatile<u32>A multi-part field:
paylen: the size in bytes of the data buffer in host memory. not including the fields that the hardware adds), occupies bits[31:14].popts: options to offload checksum calculation, occupies bits[13:8].sta: status of the descriptor (whether it’s in use or not), occupies bits[3:0].
Implementations§
Source§impl AdvancedTxDescriptor
impl AdvancedTxDescriptor
Sourcepub fn send(&mut self, transmit_buffer_addr: u64, transmit_buffer_length: u16)
pub fn send(&mut self, transmit_buffer_addr: u64, transmit_buffer_length: u16)
Updates the transmit descriptor to send the packet. We assume that one transmit descriptor will be used to send one packet.
§Arguments
transmit_buffer_addr: physical address of the transmit buffer.transmit_buffer_length: length of packet we want to send.
Sourcepub fn wait_for_packet_tx(&self)
pub fn wait_for_packet_tx(&self)
Polls the Descriptor Done bit until the packet has been sent.
Auto Trait Implementations§
impl Freeze for AdvancedTxDescriptor
impl RefUnwindSafe for AdvancedTxDescriptor
impl Send for AdvancedTxDescriptor
impl Sync for AdvancedTxDescriptor
impl Unpin for AdvancedTxDescriptor
impl UnsafeUnpin for AdvancedTxDescriptor
impl UnwindSafe for AdvancedTxDescriptor
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