Review package: e1000e
Name: provisional, minted by lane milestone/815-e1000e-clearance. The e1000e package of
crate-reviews.md, in its own file because the names section alone would push
that page past its budget.
The architect read this to clear the crate for its move to its own repository
(journey 5, step 6;
milestone 815 (proven Intel e1000e ring logic, released on its own)).
It describes the crate as main plus pull request #3294 leaves it.
In one paragraph
The logic of a driver for Intel's e1000e family, as pure computation: the 82574L that QEMU's
-device e1000e presents and the Sunrise Point I219. no_std, no allocator, no unsafe, no run-time
dependency. The caller supplies volatile register access and DMA memory behind four small traits;
the crate computes everything else (offsets and bits, descriptors, the DMA region's layout, the
receive and transmit rings, the I219 bring-up). Kani proves three properties and each has a
falsification patch. The architect cleared it, and it lives in partsfoundry/e1000e, where the template's
register naming gate finds nothing.
Identity
| item | value |
|---|---|
| crate | e1000e, ratified (the family name QEMU and Linux both use), permanent on first publication |
| version and tag | 0.1.0 in the manifest; the tag v0.1.0 goes on the move commit, as the pilot's did |
| repository | partsfoundry/e1000e |
edition, rust-version |
2024, 1.88 |
| license | (MIT OR Apache-2.0) AND BSD-3-Clause AND BSD-2-Clause; both texts of the pair at the crate root |
publish |
false; crates/publish-allowlist.txt lists no crate |
| size | about 3,900 lines of library source, 1,900 of tests and simulator, three Kani harnesses |
| package | cargo package packs 30 files, 273 KiB (67 KiB compressed), the three patches included, and builds from the packed copy |
What was run
This lane ran each check in its own worktree, on this branch.
| check | result |
|---|---|
script/crate-standalone e1000e |
clean: build on 1.88 for the host and the three bare-metal targets; Kani 3 of 3 prove; all 3 falsification patches fail their harness |
cargo test -p e1000e |
66 unit tests and 2 doctests pass; one doctest is the README's usage example |
cargo clippy --all-targets, cargo doc |
no warning |
python3 helpers/name_release.py --draft e1000e |
180 names, every one ratified; none provisional by that tool |
script/lint --quick |
all 27 sections pass |
cargo package |
passes |
Not run, and so not claimed: the stranger test, mutation, cargo-semver-checks (a first release has
no baseline) and the template's workflows (they run in the repository). The three naming checks ran over
every file under src/, and the results are in the Names section.
API
- Root:
DataPlane(new,start,receive,transmit,can_transmit,receive_cursor,set_receive_tail,set_transmit_tail),DirectMemoryAccessRegionandTails(the caller's half),ReceiveVerdictwithreceive_verdict,TransmitError, the descriptor constants, the control-register values andstation_mac_address_from_receive_words, and the device table (DEVICE_IDS,VENDOR_INTEL,is_supported_device,model_name). registersandlayout: BAR0 offsets and the DMA region's offsets, each a spelled-out constant.platform_controller_hub(aliaspch): the I219 bring-up behind theHardwaretrait.sequence(initialize_hardware,global_reset,setup_copper_link, the errata),flush(empty_descriptor_rings,FlushSupport,EmptiedRings),physical_layer_device(management data input and output access behind a heldSoftwareFlag),non_volatile_memory,ultra_low_powerandreset.- No nife type, capability or handoff appears in a public signature.
cargo treelists no dependency.
What is surprising in the API
- Every error enum (
TransmitErrorand the fourErrortypes) now implementsDisplayandcore::error::Error;sequence::Errorreports its wrapped errors as the source. Hardware::notereceives aBringUpObservation, an enum for printing, not matching. It is#[non_exhaustive], so a match needs a wildcard arm.SoftwareFlaghas a private field, so onlyphysical_layer_device::acquiremakes one. It proves it holds the flag; it does not release on drop.releaseconsumes it.PagedAccessPlanhas public fields and is#[non_exhaustive]: a caller reads a plan and cannot build one.- Raw
u32andu64values stand for register contents, as in every register crate here.
Proofs
| harness | what it proves |
|---|---|
proofs::a_delivered_frame_always_fits_the_buffer_and_the_room |
for every status word and buffer size, a frame receive_verdict delivers fits both |
proofs::every_ring_offset_is_inside_the_region |
for any index, every descriptor and buffer offset lies inside its part of the DMA region |
platform_controller_hub::physical_layer_device::proofs::a_paged_access_selects_the_offsets_own_page_and_register |
a paged access names an address that exists, the offset's own register and its own page |
Not proven: the non-volatile memory reads (device-supplied input, the first candidate for a fourth harness), the reset, ultra low power and physical layer workaround sequences (ordered writes), and transmit descriptor status. Host tests against a simulated device cover them.
Names
Every Name: block reads ratified; the move commit strips them.
Naming rules
The template's own checks (vendor/crate-workflows/helpers/, run with --manifest over every
.rs file under src/, 1,046 names judged), then a reading of every name for clipped words the
word list does not hold.
| rule | result |
|---|---|
spelled-out words (spelled_out.py) |
0 findings. The 34 private findings were renamed; see "Renamed" below. |
units spelled out (unit_symbols.py) |
0 findings. The checker reads suffixes only, so it does not see PBA_26K (borderline, below). |
question shape (question_shape.py) |
0 findings. The test helper swflag_free is is_software_flag_free. |
| British spelling | 0 findings. |
| aliases of an old nife spelling | none. Every doc(alias) is a source or specification term. |
id, oem, crs, ecc, mii, gbe |
read as accepted words or specification terms of art; see the borderline list for the ones with no expansion at the item. LAN is not an accepted acronym: every name spells it local_area_network, and a FreeBSD or Linux symbol that holds it (LANPHYPC, LAN_INIT_DONE, ich8lan) is cited as written. |
A general gate for undeclared abbreviations: the word list refuses only listed words, so every clipped word that nobody listed passes. The 34 private names fixed here were all listed words; dozens more (the bit constants below) are not.
Renamed by this lane
Private names only (pub(crate), module-private, locals, parameters, test types and test names).
No renamed name has a Name: block, and none is reached from outside the crate.
| group | now | was |
|---|---|---|
| PHY words in private constants | PHYSICAL_LAYER_DEVICE_SHIFT, PHYSICAL_LAYER_DEVICE_PAGE_SHIFT, PHYSICAL_LAYER_DEVICE_REVISION_MASK, PHYSICAL_LAYER_DEVICE_CONTROL_REGISTER, MAXIMUM_PHYSICAL_LAYER_DEVICE_REGISTER_ADDRESS, MAXIMUM_PHYSICAL_LAYER_DEVICE_MULTI_PAGE_REGISTER, IGP01E1000_PHYSICAL_LAYER_DEVICE_PAGE_SELECT, CTRL_PHYSICAL_LAYER_DEVICE_RESET, PHYSICAL_LAYER_DEVICE_CTRL_GBE_DISABLE, PHYSICAL_LAYER_DEVICE_CTRL_D0A_LPLU, I82577_PHYSICAL_LAYER_DEVICE_CTRL2_* |
PHY_SHIFT, PHY_PAGE_SHIFT, PHY_REVISION_MASK, PHY_CTRL, MAX_PHY_REG_ADDRESS, MAX_PHY_MULTI_PAGE_REG, IGP01E1000_PHY_PAGE_SELECT, CTRL_PHY_RST, PHY_CTRL_GBE_DISABLE, PHY_CTRL_D0A_LPLU, I82577_PHY_CTRL2_* |
| operation, register, configuration, capability, transmit words | OPERATION_READ, OPERATION_WRITE, REGISTER_SHIFT, REGISTER_MASK, *_CONFIGURATION_*, NWAY_AR_*_DUPLEX_CAPABILITY, CR_1000_MEGABITS_*_DUPLEX_CAPABILITY, NWAY_AR_ASYMMETRIC_PAUSE_DIRECTION, TXDCTL_FULL_TRANSMIT_DESCRIPTOR_WRITE_BACK, TXDCTL_MAXIMUM_TRANSMIT_DESCRIPTOR_PREFETCH, I82577_CONFIGURATION_ASSERT_CRS_ON_TRANSMIT |
OP_*, REG_*, *_CFG_*, *_CAPS, *_TX_*, *_MAX_* |
| other words | STATUS_LOCAL_AREA_NETWORK_INITIALIZATION_DONE, EXTCNF_SIZE_EXT_PCI_EXPRESS_LENGTH_MASK, FEXTNVM_SOFTWARE_CONFIGURATION_ICH8M, ULTRA_LOW_POWER_CONFIGURATION1_CLEARED, I218_ULTRA_LOW_POWER_CONFIGURATION1_START, configuration_done, leave_ultra_low_power, leave_ultra_low_power_by_physical_layer_device |
STATUS_LAN_INIT_DONE, EXTCNF_SIZE_EXT_PCIE_LENGTH_MASK, FEXTNVM_SW_CONFIG_ICH8M, ULP_CONFIG1_CLEARED, I218_ULP_CONFIG1_START, config_done, leave_ulp, leave_ulp_by_physical_layer_device |
| control-register bits | RECEIVE_CONTROL_ENABLE, RECEIVE_CONTROL_ACCEPT_BROADCAST, RECEIVE_CONTROL_STRIP_CRC, TRANSMIT_CONTROL_ENABLE, TRANSMIT_CONTROL_PAD_SHORT_PACKETS |
RCTL_EN, RCTL_BAM, RCTL_SECRC, TCTL_EN, TCTL_PSP |
| test types and fields | SimulatedDevice, TailRegisters, memory, receive_tail, transmit_tail, receive_head, transmit_head, PHYSICAL_ADDRESS, data_plane, simulator, receive_address_low, receive_address_high |
Sim, Regs, mem, rdt, tdt, rdh, tdh, PHYS, dp, sim, ral, rah |
| locals | descriptor_offset, index, low_bytes, high_bytes, low, high, device_control, extended_control, flash_control, register, status |
d, i, l, h, lo, hi, ctrl, ext, ctl, reg, st |
| test name | the_transmit_command_is_end_of_packet_frame_check_sequence_and_report_status |
the_transmit_command_is_eop_ifcs_and_rs |
| physical layer device register offsets | POWER_MANAGEMENT_CONTROL_REGISTER, OEM_BITS_REGISTER, SYSTEM_MANAGEMENT_BUS_ADDRESS_REGISTER, LED_CONFIGURATION_REGISTER, FIRST_PAGE_AT_PHYSICAL_LAYER_DEVICE_ADDRESS_ONE |
HV_PM_CTRL, HV_OEM_BITS, HV_SMB_ADDR, HV_LED_CONFIG, HV_INTC_FC_PAGE_START (each kept as an alias) |
| physical layer device register bits | POWER_MANAGEMENT_CONTROL_K1_ENABLE, SYSTEM_MANAGEMENT_BUS_ADDRESS_{MASK,VALID,PACKET_ERROR_CHECKING_ENABLE,FREQUENCY_MASK,FREQUENCY_LOW_SHIFT,FREQUENCY_HIGH_SHIFT}, OEM_BITS_{GIGABIT_DISABLE,LOW_POWER_LINK_UP,RESTART_AUTONEGOTIATION} |
HV_PM_CTRL_K1_ENABLE, HV_SMB_ADDR_{MASK,VALID,PEC_EN,FREQ_MASK,FREQ_LOW_SHIFT,FREQ_HIGH_SHIFT}, HV_OEM_BITS_{GBE_DIS,LPLU,RESTART_AN} (each kept as an alias; single bits written as shifts) |
The falsification patch for a_paged_access_selects_the_offsets_own_page_and_register quotes two
of the renamed constants in its context lines and the lane updated it to match; all three patches apply and
fail their harness.
Borderline private names, left as they are
Each mirrors a FreeBSD or Intel define whose expansion the sources do not give, so the lane could
not write the expansion the kept-name form requires without guessing. The architect or the
maintainer decides whether each gets the kept form ((NAME, source) and a doc(alias)) or a
spelled-out name.
- Bit constants in
sequence.rs:CTRL_LANPHYPC_*,CTRL_FRCSPD,CTRL_FRCDPX,CTRL_MEHE,CTRL_EXT_LPCD,CTRL_EXT_RO_DIS,CTRL_EXT_PHYPDEN,STATUS_PHYRA,EXTCNF_CTRL_*,FEXTNVM3_*,FEXTNVM7_DISABLE_SMB_PERST,STRAP_SMT_FREQ_*,TCTL_MULR,RFCTL_NFSW_DIS,RFCTL_NFSR_DIS,PBECCSTS_ECC_ENABLE,TXDCTL_WTHRESH,TXDCTL_PTHRESH,RCTL_RDMTS_HEX,TARC0_CB_MULTIQ_*_REQ,CV_SMB_CTRL_*,MII_CR_*,NWAY_AR_PAUSE. PBA_26Kcarries a unit symbol (K) that the unit checker cannot see; the spelled-out form isPBA_26_KILOBYTES.- Constants outside
sequence.rs:ICH_FWSM_*,FWSM_ULP_CFG_DONE,H2ME_ULP,KABGTXD_BGSQLBIAS,CTRL_GIO_MASTER_DISABLE,STATUS_GIO_MASTER_ENABLE,BM_WUC_PAGE,I82577_CFG_REG, and theBM_*register offsets. - The register offsets in
platform_controller_hub::registers(STRAP,MDIC,LEDCTL,PBA,FWSMand the like). Each carries a bold title and an alias, but not the(NAME, source)opening. - Private functions and fields named for a register:
oem_bits(the mutation exclusions name it),from_strap,mdic,mdic_log,strap_writes,mac_mdic. - Single-letter locals and parameters:
sequence.rs41,simulator.rs41 (nearly all inside its tests),physical_layer_device.rs7,non_volatile_memory.rs7 anddata_plane.rs1 (the formatter parameterf, which is the standard library's convention). Single-letter test locals are out of scope, and these counts do not separate them from the others.
Ratified earlier, failing a later rule
The rule of 2026-11-02 spells out a register or bit name copied from a source and keeps the source
spelling as a doc(alias). Five names ratified before it follow it, each with its old spelling as an
alias:
| name | aliases |
|---|---|
registers::MULTICAST_TABLE_ARRAY_ENTRIES |
MTA_ENTRIES, OpenBSD's E1000_NUM_MTA_REGISTERS |
flush::DESCRIPTOR_RING_FLUSH_REQUIRED |
FLUSH_DESC_REQUIRED |
flush::PCI_CONFIGURATION_DESCRIPTOR_RING_STATUS_REGISTER |
PCICFG_DESC_RING_STATUS |
physical_layer_device::registers::PHYSICAL_LAYER_DEVICE_CONTROL_REGISTER |
PHY_CONTROL, OpenBSD's PHY_CTRL |
physical_layer_device::registers::KUMERAN_MODE_CONTROL_REGISTER |
HV_KMRN_MODE_CTRL, OpenBSD's I2_MODE_CTRL |
Three public names spell out LAN, which is not an accepted acronym, and are ratified:
sequence::BringUpObservation::LocalAreaNetworkInitializationTimeout (which spells out init
too), LocalAreaNetworkConnectedDeviceConfigured and LocalAreaNetworkConnectedDeviceNotConfigured.
Each carries the source term as an alias (LAN_INIT_DONE, lcd).
Ratified at the last review
The architect ratified HARDWARE_SEQUENCING_FLASH_STATUS_REGISTER (alias HSFSTS),
physical_layer_device::acquire and sequence::setup_copper_link as they stand. The same ruling
covers the names the spelled-out rule produced, each keeping the source term as an alias:
| now | alias |
|---|---|
sequence::BringUpObservation::ManagementEngineUltraLowPowerExit, SoftwareUltraLowPowerExit |
ulp |
sequence::Error::PhysicalLayerDevicePowerCycleBlocked, AccessPath::AfterPhysicalLayerDevicePowerCycle |
lanphypc |
BringUpObservation::SoftwareFlagBeforeReset, physical_layer_device::Error::SoftwareFlagHeld, SoftwareFlagRefused |
swflag |
physical_layer_device::management_data_interface_control |
mdic |
non_volatile_memory::flash_status, flash_control (modules) |
none |
The private flash constants spell the register out and keep the source spelling as an alias:
FLASH_REGISTERS_OFFSET_BYTES (FLASH_BASE_ADDR), FLASH_LINEAR_ADDRESS_REGISTER
(ICH_FLASH_FADDR) and FLASH_DATA_0_REGISTER (ICH_FLASH_FDATA0). The first is an offset into
BAR0 and not an address, so its name ends in the unit, as the offsets of layout do. The clipped
parameters (ral, rah, fwsm, h2me, tdlen, tdt) now read in full, provisionally.
The old nife spellings carry no alias, by the rule for a crate before its first release. The kernel,
the components and the system tests name none of them. notes/e1000e.md uses the new variant names; the bench log keeps its old text.
The remaining variants and the Hardware trait's method names are still provisional.
Dependencies, unsafe, no_std
None at run time or development. No unsafe site. no_std; the host tests use std. The crate
names no other crate's type.
License and notices
The crate's own code is MIT OR Apache-2.0. Everything under src/platform_controller_hub/ adapts
FreeBSD: the Intel shared code (BSD-3-Clause) and if_em.c and if_em.h (BSD-2-Clause). The
notices, with Intel's, Nicole Graziano's and Kevin Bowling's copyright lines, are in
platform_controller_hub/mod.rs, and non_volatile_memory.rs, physical_layer_device.rs and
sequence.rs carry the BSD-3-Clause notice of the file each follows. mod.rs states that the
whole directory is BSD-2-Clause AND BSD-3-Clause. Milestone 1019 (the driver crates carry facts
from their sources, not their text)
items 3 and 4 hold; no other item names this crate. Linux's GPL driver was read for offsets and bits
only, and the README says the crate copies no Linux code. The license field names all three licenses, and the lint section that compares it with the sources passes.
The README, from a stranger's chair
The README names no other project's program. Its commands were not run in a scratch copy: only its usage example runs (as a doctest). It tells a newcomer how to install Kani and rerun the proofs, and how to apply a falsification patch. It lists its limitations (one queue pair, polled; only two device families claimed; the I219's link-up half not ported; one run on real hardware, with no cable).
Crates.io readiness
- README present, with proofs, usage, limitations and license.
- Errors implement
Displayandcore::error::Error. #[non_exhaustive]on the four error enums,TransmitError,AccessPath,BringUpObservation,EmptiedRingsandPagedAccessPlan. The maintainer rules this provisionally, with the restrictive option: relaxing it later breaks nothing, and adding it later does.ReceiveVerdictstays exhaustive: it is a three-way verdict the caller must handle in full.- Keywords, categories and description are in the manifest.
- No example program: the README's example is the cheap one.
Outstanding before the move
| item | owner |
|---|---|
Clear the move, and the tag v0.1.0 asked separately. |
architect |
The move commit strips the 180 Name: blocks, which cite this tree. |
move lane |
Convert each consumer's path dependency (kernel, components, system tests, driver_process_contract) to git and rev with version = "0.1.0". |
move lane |
Move the parts of notes/e1000e.md and notes/e1000e/the-i219-port.md that are about the crate alone into the crate (ยง310 (read a note against its code)). |
move lane |
| Run the stranger test, the template's workflows and a release dry run in the new repository. | move lane |
Recommendation
Ready for review. The code, the proofs and the notices are in order. The architect's clearance is the one decision below.
Decisions for the architect
- Clear the move, with the tag
v0.1.0asked separately. Background: your clearance of the review is the go for creatingpartsfoundry/e1000e, and nothing publishes.