1 unstable release
| new 0.1.1-preview.1 | Feb 6, 2026 |
|---|
#3 in #nic
Used in axdriver_net
290KB
5.5K
SLoC
Ixgbe-driver
Introduction
ixgbe-driver is a kernel-level Intel 10Gb network card driver implemented in the Rust programming language. It is developed based on ixy.rs.
The project is currently under development, and this driver is planned to be used in Arceos, providing a non-blocking interface and support for async calls.
lib.rs:
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)
Dependencies
~3.5MB
~80K SLoC