| Crates.io | eth-igb |
| lib.rs | eth-igb |
| version | 0.1.1 |
| created_at | 2025-07-18 08:03:26.463057+00 |
| updated_at | 2025-07-18 08:09:06.589802+00 |
| description | Intel IGB Ethernet driver |
| homepage | |
| repository | https://github.com/drivercraft/ethernet-intel |
| max_upload_size | |
| id | 1758720 |
| size | 162,116 |
A Rust-based Intel IGB Ethernet driver supporting 82576 series network controllers.
First impl dma-api
use eth_igb::{Igb, Request};
struct KernelImpl;
eth_igb::impl_trait! {
impl Kernel for KernelImpl {
fn sleep(duration: Duration) {
your_os::spin_delay(duration);
}
}
}
// Create driver instance
let mut igb = Igb::new(iobase)?;
// Open device
igb.open()?;
// Create transmit and receive rings
let (tx_ring, rx_ring) = igb.new_ring()?;
// Prepare transmission data
let data = vec![0u8; 1500];
let request = Request::new_tx(data);
// Send packet
tx_ring.send(request)?;
// Prepare receive buffer
let buff = vec![0u8; rx_ring.packet_size()];
let request = Request::new_rx(buff);
rx_ring.submit(request)?;
// Receive packet
if let Some(packet) = rx_ring.next_pkt() {
println!("Received packet: {} bytes", packet.len());
}
The project includes a comprehensive test suite:
# Run all tests
cargo test --test test -- tests --show-output
# Testing with U-Boot development board
cargo test --test test -- tests --show-output --uboot
This project is licensed under an appropriate open source license. Please see the LICENSE file for details.