Skip to main content

AdvancedRxDescriptor

Struct AdvancedRxDescriptor 

Source
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

Source

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.
Source

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.
Source

pub fn reset_status(&mut self)

Clears the status bits of the descriptor.

Source

pub fn descriptor_done(&self) -> bool

Returns true if the descriptor has a received packet copied to its buffer.

Source

pub fn end_of_packet(&self) -> bool

Returns true if the descriptor’s packet buffer is the last in a frame.

Source

pub fn length(&self) -> u64

The length of the packet in the descriptor’s packet buffer.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn get_rss_hash(&self) -> u64

Write Back mode function for the Advanced Receive Descriptor. Returns the Receive Side Scaling hash.

Source

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.

Source

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

Source

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

Source

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

Source

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.