Expand description
§ixgbe-driver
A no_std driver implementation for Intel 82599+ 10 Gigabit Ethernet NICs.
This crate provides a safe, low-level driver for the Intel 82599 (ixgbe) family of network interface cards. It is designed to be used in embedded and bare-metal environments where the standard library is not available.
§Features
no_stdcompatible - works without the standard library- Multi-queue support for both RX and TX
- MSI/MSI-X interrupt support (with
irqfeature) - Memory pool management for efficient packet buffer allocation
- Zero-copy packet handling
§Basic Usage
ⓘ
use ixgbe_driver::{IxgbeDevice, IxgbeHal, MemPool, NicDevice};
// First, implement the IxgbeHal trait for your platform
struct MyHal;
unsafe impl IxgbeHal for MyHal {
// Implement required methods...
}
// Initialize the device
let pool = MemPool::allocate::<MyHal>(4096, 2048)?;
let device = IxgbeDevice::<MyHal, 512>::init(
pci_bar_addr,
pci_bar_size,
num_rx_queues,
num_tx_queues,
&pool,
)?;
// Send and receive packets
let tx_buf = IxgbeNetBuf::alloc(&pool, packet_size)?;
device.send(queue_id, tx_buf)?;
device.receive_packets(queue_id, num_packets, |rx_buf| {
// Handle received packet
})?;§Hardware Abstraction Layer (HAL)
This driver requires the user to implement the IxgbeHal trait, which provides
platform-specific operations such as:
- DMA memory allocation/deallocation
- MMIO address translation
- Timing/waiting operations
§Platform Support
The ixgbe driver supports Intel 82599 and compatible 10GbE controllers including:
- Intel 82599ES
- Intel X540
- Intel X550/X552
§Interrupt Modes
The driver supports three operation modes:
- Polling mode (default): No interrupts, the driver continuously polls for packets
- MSI mode: Message Signaled Interrupts (with
irqfeature) - MSI-X mode: Extended MSI with multiple vectors (with
irqfeature)
Modules§
- descriptor
- Hardware descriptor definitions for the Intel 82599 NIC.
Structs§
- Device
Stats - Network device statistics.
- Ixgbe
Device - The main Intel 82599 device driver.
- Ixgbe
NetBuf - A network buffer for the ixgbe driver.
- MemPool
- A memory pool for efficient DMA-capable buffer allocation.
Enums§
- Ixgbe
Error - Error type for ixgbe driver operations.
Constants§
- INTEL_
82599 - Device ID for the 82599ES, used to identify the device from the PCI space.
- INTEL_
VEND - Vendor ID for Intel.
- PACKET_
HEADROOM - Headroom reserved at the start of each packet buffer.
Traits§
- Ixgbe
Hal - The interface which a particular hardware implementation must implement.
- NicDevice
- Generic network device interface.
Functions§
- alloc_
pkt - Allocates a packet from the memory pool.
Type Aliases§
- Ixgbe
Result - Result type for ixgbe driver functions.
- Phys
Addr - Physical address in system memory.