Struct mlx5::ConnectX5Nic
source · pub struct ConnectX5Nic { /* private fields */ }
Expand description
Struct representing a ConnectX-5 network interface card.
Implementations§
source§impl ConnectX5Nic
impl ConnectX5Nic
Functions that setup the NIC struct and transmit packets.
sourcepub fn init(
mlx5_pci_dev: &PciDevice,
num_tx_descs: usize,
num_rx_descs: usize,
mtu: u16
) -> Result<&'static IrqSafeMutex<ConnectX5Nic>, &'static str>
pub fn init( mlx5_pci_dev: &PciDevice, num_tx_descs: usize, num_rx_descs: usize, mtu: u16 ) -> Result<&'static IrqSafeMutex<ConnectX5Nic>, &'static str>
Initializes the new ConnectX-5 network interface card that is connected as the given PciDevice. (steps taken from the PRM, Section 7.2: HCA Driver Start-up)
Arguments
mlx5_pci_dev
: Contains the pci device information for this NIC.num_tx_descs
: The number of descriptors in each transmit queue.num_rx_descs
: The number of descriptors in each receive queue.mtu
: Maximum Transmission Unit in bytes
sourcepub fn mac_address(&self) -> [u8; 6]
pub fn mac_address(&self) -> [u8; 6]
Returns the MAC address of the physical function
sourcepub fn send(&mut self, buffer: TransmitBuffer) -> Result<(), &'static str>
pub fn send(&mut self, buffer: TransmitBuffer) -> Result<(), &'static str>
Adds a packet to be sent to the transmit queue and returns once it is sent.
sourcepub fn send_fastpath(&mut self, buffer_addr: PhysicalAddress, buffer: &[u8])
pub fn send_fastpath(&mut self, buffer_addr: PhysicalAddress, buffer: &[u8])
Adds a packet to be sent to the transmit queue.
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectX5Nic
impl Send for ConnectX5Nic
impl Sync for ConnectX5Nic
impl Unpin for ConnectX5Nic
impl !UnwindSafe for ConnectX5Nic
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