The e1000e NIC: the network card a PC actually has
(Milestone 494 (a driver for the network card a PC actually has), rung 3b of milestone 198 (a
package manager, and the trivial install). Every name on this page is provisional: e1000e for the
crate, e1000e_transport, e1000e_service, network_bench, cargo xtask network-bench and this
page's stem. An architect names things.)
nife's first network driver for a device a physical machine has. Intel's e1000e family covers
the 82574L, which QEMU emulates as -device e1000e, and the I219 that xenon and a large share of
business desktops carry. The driver is milestone 261 (the NVMe driver leaves the kernel)'s shape
applied to a second real device, and it adds no system call surface.
How it is split
| piece | where | what it does |
|---|---|---|
| control plane | kernel/src/e1000e.rs |
finds the NIC, confines its DMA to one region, resets it, reads the MAC address, programs both ring bases, enables receive and transmit |
| what the process is handed | kernel/src/user/e1000e_service.rs |
the spawn: two pages of BAR0, the DMA region, net_stack's usual slots minus the interrupt and the virtio transport |
| data plane | components/src/e1000e_transport.rs, inside net_stack |
posts receive buffers, copies frames, moves the two tails, polls |
| everything either half computes | partsfoundry/e1000e |
register map, descriptor formats, the DMA layout, and the whole ring logic behind two traits, host-tested against a simulated device and proved by Kani |
| what the kernel and the process agree on | crates/driver_process_contract's e1000e |
the spawn handoff (Handoff, ROLE_TAG) and the three virtual addresses the process's windows sit at |
net_stack drives every NIC it has a transport for through one enum, Nic
(components/src/nic_device.rs), which is where smoltcp's phy::Device lives. Its entry,
start in components/src/socket_server.rs, picks the server by the role word: 0 is the virtio
server, and a word driver_process_contract::e1000e::Handoff::is_role accepts is the e1000e
server. Handoff::pack and Handoff::unpack are the two words' layout, on the kernel's side and
the process's.
The crate's README says where its register facts come from. Why its platform_controller_hub module ports FreeBSD's
I219 bring-up, and how the kernel calls it, is in the I219 port.
The finding that decides the confinement
NVMe put its doorbells on a page of their own, so milestone 261's server can ring them without
being able to move a ring. The e1000e family does not. Receive queue 0's base register is at
0x2800 and its tail at 0x2818; transmit's are 0x3800 and 0x3818 (Linux's regs.h, read
2026-10-04; partsfoundry/e1000e's registers). The process that moves a tail can also repoint the ring,
so the IOMMU is the whole of the DMA confinement on this device, which milestone 494's block
predicted from recall and the register map now confirms.
What the split still keeps from the process: BAR0's page 0 (CTRL, STATUS, RCTL, TCTL, the
interrupt registers) and page 5 (the receive address and multicast filters). It cannot reset the
device, change its MAC address, receive promiscuously, or reach the PHY.
That the IOMMU is doing the work was watched, not assumed. With the kernel's iommu::confine call
skipped, QEMU printed vtd_iommu_translate: detected translation failure (dev=00:05:00, iova=0x920000) on the NIC's first ring fetch and no lease ever came (2026-10-04, x86_64; the DHCP
test's Falsification: record).
What the server holds
kernel/src/user/e1000e_service.rs is the whole of what the process is handed, and it follows the
virtio server's slot layout so the rest of net_stack is unchanged.
- Slot 0, the report endpoint (WRITE), which carries the DHCP lease once.
- Slots 1 and 2 are empty: there is no interrupt and no
VirtualIotransport to hold. - Slot 3, the heap's budget, and slot 4, the
Stackendpoint (READ). - Slots 5 and 6, the notification and timer the poll loop sleeps on between looks at the rings.
- Slot 7, the
Stackendpoint again (WRITE and GRANT), which each socket's capability is minted from (ยง255 (each socket is its own capability)). - Slot 8, the server's own address space, to unmap a closed socket's page.
- Mapped: the DMA region,
e1000e::layout::DIRECT_MEMORY_ACCESS_REGION_PAGESpages of normal memory holding both rings and every buffer. - Mapped: two pages of BAR0, device-typed, holding the receive and transmit queue registers. Device typing matters because a cached or reordered tail write is a frame the device never hears of.
arg0andarg1carrydriver_process_contract::e1000e::Handoff, the MAC address and the region's physical base.
What it is denied is each a decision. BAR0's pages 0 and 5 stay with the kernel, as above. It holds
no Interrupt capability: it polls, as the NVMe server does, because x86 routes no device line to a
userspace waiter yet and the device is created with every interrupt masked. And it holds no
DeviceFrame or PageFrame capability for either window. They arrive as spawn-time mappings, so it
holds no name for them and cannot delegate or remap them.
A server over a link that is down is never started (Absent::NoLink). net_stack's DHCP loop has
no bound, and every caller blocks on its lease. Such a server would be a wait with no end: a boot
that never reaches its prompt, or a system test the harness watchdog stops along with the suite.
The booted system also leaves a PCH part such as the I219 untouched until
PCH_PROVEN_ON_SILICON is set. Bring-up on one runs FreeBSD's I219 passes, and a hang in them
would take xenon's prompt with it. That constant is set only in a commit that cites a xenon bench
boot of the same bring-up ending verdict LEASED-AND-MEASURED. QEMU's 82574L never takes the PCH
path, and the host simulation is this tree's reading of FreeBSD, not the device.
The gates, and what each proves
system_tests/src/user/e1000e_tests.rs, one module for all three architectures:
| test | proves |
|---|---|
net_stack_gets_a_dhcp_lease_over_the_e1000e_nic_behind_the_iommu |
smoltcp's DHCP round trip through this data plane; the owning IOMMU unit was translating; the MAC address reached net_stack from the device's own register |
a_client_echoes_over_tcp_through_the_e1000e_nic |
milestone 30 (the network stack as a confined component)'s TCP gate, same client |
a_client_completes_a_udp_round_trip_through_the_e1000e_nic |
the datagram path, against slirp's TFTP server |
a_package_fetched_over_the_e1000e_nic_is_accepted_only_by_the_image_digest |
rung 3a's fetch-and-verify, tens of kilobytes twice over TCP in full-size frames |
Green on aarch64, riscv64 and x86_64 (PVH and OVMF) on patagonia, 2026-10-04. Each runner attaches
the NIC as -device e1000e,mac=52:54:00:e1:00:0e,romfile= on its own slirp network whenever
NIFE_NET is set, and the OVMF runner always does.
The OVMF runner had a NIC nobody chose. Until this milestone helpers/qemu-uefi-x86_64.sh
named no network, and QEMU added its default: on q35 that is an e1000e on user networking. The
first UDP run here reached slirp's TFTP server and was told the fixture did not exist, which is how
it showed up. The device is now explicit and carries the same peers the other runners give theirs.
The bench boot
cargo xtask network-bench builds the network_bench kernel (release), stages it at
target/esp-network-bench, and rehearses it under OVMF against helpers/network-bench-peer. The boot
prints, every line prefixed network-bench:, the NIC's id and model with link and MAC, the DMAR
preflight, the lease, the transfer, and one verdict. The rehearsal on 2026-10-04:
This transcript predates the phy line (2026-10-05), which a rehearsal now prints after nic as
network-bench: phy : id 0x01410cb0.
network-bench: nic : 8086:10d3 82574L (QEMU's e1000e), link up, mac 52:54:00:e1:00:0e
network-bench: preflight dmar scope : PASS
network-bench: dhcp : leased 10.0.2.15
network-bench: transfer : 8388608 bytes in 0.891 s = 75.308 Mbit/s
network-bench: verdict LEASED-AND-MEASURED
That rate is QEMU's under TCG and says nothing about a NIC. What the number counts on any
machine is in notes/bench-boots.md: one stream through a 16 KiB receive window,
a RECEIVE call per chunk, the NIC looked at continuously while frames flow. It measures this
stack as built.
calef's bench step on xenon
Milestone 494's exit criterion 2, and the gate on PCH_PROVEN_ON_SILICON, is one boot of the
bench kernel on xenon with the I219 cabled to a switch. The procedure, every ending, what to
record and the Results table are the I219 cabled run. The same
boot records what partsfoundry/e1000e issue 10 asks for: the bring-up observations, the link state and
the frame counts in both directions, from the device's own counters (frame_counts in
kernel/src/e1000e.rs, printed as network-bench: frames). It ends
network-bench: verdict LEASED-AND-MEASURED when it succeeds.
BUGS
- The I219 path has run once on silicon, with no cable: xenon left ULP, reached the PHY directly
(
0x015400a0) and loaded its LCD configuration (bench/xenon-2026-10-21/README-494.md). No link, lease or transfer has. Every other pass is QEMU's 82574L, which proves only the MDIO read the I219 path shares (the DHCP gate's PHY identifier). For the I219 the kernel runs FreeBSD's attach and reset sequence, ported with Intel's BSD license intopartsfoundry/e1000e/src/platform_controller_hub/and tested against a simulation of it; FreeBSD's link-up reconfiguration is not ported. Milestone 494'sReusesection has the review, and its bench runbook is the first run of any of it. - The IOMMU is the whole DMA confinement (above). A machine without one that owns the NIC runs this driver as confined as its arithmetic, as milestone 261's NVMe server is.
- Some kept bit constants lack Decision 30's documentation. The register maps, the register-value
functions and the public bits in
control_registersandplatform_controller_hub::flushopen their docs with the full name and source and carry adoc(alias). TheMDICbits and about 60 private bits inplatform_controller_hub::sequencedo not. Each needs its full name, its FreeBSD source and an alias. - Polled; no interrupt reaches a userspace waiter on x86 yet. While frames flow the stack looks
at the ring continuously. Once it is idle the stack sleeps
e1000e_transport::POLL_MILLISECONDS(1 ms) between looks, which the kernel rounds up to the next tick (up to 10 ms). - One server at a time. A second wiring would reset the device under the first, so the service refuses while the first's thread lives.
- The booted system uses it only for a part a gate has driven. Since 2026-10-05 the kernel builds
net_stackon ane1000eat boot when there is no virtio-net NIC, and grants the progenitor its endpoint (boot_e1000e_networkinkernel/src/user/device_starters.rs, milestone 198 (a package manager)). It leaves a PCH part such as the I219 untouched, and a NIC with no link, so xenon's booted system has no network until milestone 494's bench runbook has run on it. Lifting that is one constant,e1000e_service::PCH_PROVEN_ON_SILICON. - The client role selectors are spelled in seven places (
socket_test_client,network_tests,riscv64_virtual_io_tests,e1000e_tests,net_confinement_tests,e1000e_serviceanddesignware_ethernet_service), a rule 7 debt this milestone added to rather than paid. - One unexplained hang, not reproduced. It happened on 2026-10-11 (UTC), in a full x86_64
script/testof the branch of milestone 840 (the scheduler file is split along its seams). The test wasa_client_completes_a_udp_round_trip_through_the_e1000e_nic, in the AMD-Vi leg (NIFE_IOMMU=amd). A user thread died onvector 14 (page fault)withripand the faulting address both0x6002d242and error code0x14. That is an instruction fetch from a user page that was not present. The test then waited for a reply that never came, and nothing bounded the wait. The load average was 20 to 36 at the time, and the same run's VT-d leg passed the test. Twenty bounded AMD-Vi runs found nothing: 10 on the branch and 10 on its base701cad46f, each four runs of everysystem_tests::user::test and six of this test alone. A later full x86_64 run passed every leg. So it is not attributed; it is a flake, or a defect only load exposes. When it recurs, name the faulting thread's program. Bounding the test's wait would also turn the hang into a failure.