Skip to main content

Crate ixgbe_driver

Crate ixgbe_driver 

Source
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_std compatible - works without the standard library
  • Multi-queue support for both RX and TX
  • MSI/MSI-X interrupt support (with irq feature)
  • 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 irq feature)
  • MSI-X mode: Extended MSI with multiple vectors (with irq feature)

Modules§

descriptor
Hardware descriptor definitions for the Intel 82599 NIC.

Structs§

DeviceStats
Network device statistics.
IxgbeDevice
The main Intel 82599 device driver.
IxgbeNetBuf
A network buffer for the ixgbe driver.
MemPool
A memory pool for efficient DMA-capable buffer allocation.

Enums§

IxgbeError
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§

IxgbeHal
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§

IxgbeResult
Result type for ixgbe driver functions.
PhysAddr
Physical address in system memory.