Struct driver_net::ixgbe::IxgbeNic

source ·
pub struct IxgbeNic<H: IxgbeHal, const QS: usize, const QN: u16> { /* private fields */ }
Expand description

The ixgbe NIC device driver.

QS is the ixgbe queue size, QN is the ixgbe queue num.

Implementations§

source§

impl<H: IxgbeHal, const QS: usize, const QN: u16> IxgbeNic<H, QS, QN>

source

pub fn init(base: usize, len: usize) -> DevResult<Self>

Creates a net ixgbe NIC instance and initialize, or returns a error if any step fails.

Trait Implementations§

source§

impl<H: IxgbeHal, const QS: usize, const QN: u16> BaseDriverOps for IxgbeNic<H, QS, QN>

source§

fn device_name(&self) -> &str

The name of the device.
source§

fn device_type(&self) -> DeviceType

The type of the device.
source§

impl<H: IxgbeHal, const QS: usize, const QN: u16> NetDriverOps for IxgbeNic<H, QS, QN>

source§

fn mac_address(&self) -> EthernetAddress

The ethernet address of the NIC.
source§

fn rx_queue_size(&self) -> usize

Size of the receive queue.
source§

fn tx_queue_size(&self) -> usize

Size of the transmit queue.
source§

fn can_receive(&self) -> bool

Whether can receive packets.
source§

fn can_transmit(&self) -> bool

Whether can transmit packets.
source§

fn recycle_rx_buffer(&mut self, rx_buf: NetBufPtr) -> DevResult

Gives back the rx_buf to the receive queue for later receiving. Read more
source§

fn recycle_tx_buffers(&mut self) -> DevResult

Poll the transmit queue and gives back the buffers for previous transmiting. returns DevResult.
source§

fn receive(&mut self) -> DevResult<NetBufPtr>

Receives a packet from the network and store it in the NetBuf, returns the buffer. Read more
source§

fn transmit(&mut self, tx_buf: NetBufPtr) -> DevResult

Transmits a packet in the buffer to the network, without blocking, returns DevResult.
source§

fn alloc_tx_buffer(&mut self, size: usize) -> DevResult<NetBufPtr>

Allocate a memory buffer of a specified size for network transmission, returns DevResult
source§

impl<H: IxgbeHal, const QS: usize, const QN: u16> Send for IxgbeNic<H, QS, QN>

source§

impl<H: IxgbeHal, const QS: usize, const QN: u16> Sync for IxgbeNic<H, QS, QN>

Auto Trait Implementations§

§

impl<H, const QS: usize, const QN: u16> !RefUnwindSafe for IxgbeNic<H, QS, QN>

§

impl<H, const QS: usize, const QN: u16> Unpin for IxgbeNic<H, QS, QN>
where H: Unpin,

§

impl<H, const QS: usize, const QN: u16> !UnwindSafe for IxgbeNic<H, QS, QN>

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>,

§

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>,

§

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.