pub struct AdvancedRxDescriptor {
pub packet_buffer_address: Volatile<u64>,
pub header_buffer_address: Volatile<u64>,
}Expand description
refer: Theseus Advanced Receive Descriptor used in the Ixgbe driver. It has 2 modes: Read and Write Back, both of which use the whole 128 bits. There is one receive descriptor per receive buffer that 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 bufffer for the packet.
header_buffer_address: Volatile<u64>Starting physical address of the receive buffer for the header. This field will only be used if header splitting is enabled.
Implementations§
Source§impl AdvancedRxDescriptor
impl AdvancedRxDescriptor
Sourcepub fn init(&mut self)
pub fn init(&mut self)
Initializes a receive descriptor by clearing its status and setting the descriptor’s physical address.
§Arguments
packet_buffer_address: starting physical address of the receive buffer.
Sourcepub fn set_packet_address(&mut self, packet_buffer_address: u64)
pub fn set_packet_address(&mut self, packet_buffer_address: u64)
Updates the descriptor’s physical address.
§Arguments
packet_buffer_address: starting physical address of the receive buffer.
Sourcepub fn reset_status(&mut self)
pub fn reset_status(&mut self)
Clears the status bits of the descriptor.
Sourcepub fn descriptor_done(&self) -> bool
pub fn descriptor_done(&self) -> bool
Returns true if the descriptor has a received packet copied to its buffer.
Sourcepub fn end_of_packet(&self) -> bool
pub fn end_of_packet(&self) -> bool
Returns true if the descriptor’s packet buffer is the last in a frame.
Sourcepub fn get_rss_type(&self) -> u64
pub fn get_rss_type(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the packet type that was used for the Receive Side Scaling hash function.
Sourcepub fn get_packet_type(&self) -> u64
pub fn get_packet_type(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the packet type as identified by the hardware.
Sourcepub fn get_rsccnt(&self) -> u64
pub fn get_rsccnt(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the number of Receive Side Coalesced packets that start in this descriptor.
Sourcepub fn get_hdr_len(&self) -> u64
pub fn get_hdr_len(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the size of the packet header in bytes.
Sourcepub fn get_rss_hash(&self) -> u64
pub fn get_rss_hash(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the Receive Side Scaling hash.
Sourcepub fn get_fdf_id(&self) -> u64
pub fn get_fdf_id(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the Flow Director Filter ID if the packet matches a filter.
Sourcepub fn get_ext_status(&self) -> u64
pub fn get_ext_status(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Status information indicates whether a descriptor has been used and whether the buffer is the last one for a packet
Sourcepub fn get_ext_error(&self) -> u64
pub fn get_ext_error(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns errors reported by hardware for different packet types
Sourcepub fn get_pkt_len(&self) -> u64
pub fn get_pkt_len(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. Returns the number of bytes posted to the packet buffer
Sourcepub fn get_vlan_tag(&self) -> u64
pub fn get_vlan_tag(&self) -> u64
Write Back mode function for the Advanced Receive Descriptor. If the vlan header is stripped from the packet, then the 16 bits of the VLAN tag are posted here