Skip to content

feat(igc): add single-queue polling datapath#683

Open
ytakano wants to merge 4 commits intotier4:mainfrom
ytakano:igc_single_queue_polling
Open

feat(igc): add single-queue polling datapath#683
ytakano wants to merge 4 commits intotier4:mainfrom
ytakano:igc_single_queue_polling

Conversation

@ytakano
Copy link
Copy Markdown
Collaborator

@ytakano ytakano commented Apr 22, 2026

Description

This PR adds the first usable single-queue polling datapath for the Intel I225/I226 driver.

It enables the PCIe bus-mastering required for DMA, sets up single-queue TX/RX descriptor rings, and wires the minimal polling path through send(), recv(), can_send(), and capabilities(). It also adds TX reclamation based on TDH/TDT and RX consume/refill handling for the single-queue path.

This change is intentionally limited to the minimal end-to-end datapath. It does not add shell debug commands, NetDevice::debug_dump, IRQ RX buffering, multi-queue support, or checksum offload

Related links

How was this PR tested?

  • make clippy
  • make x86_64 RELEASE=1
  • make check_x86_64

Real-machine smoke test:

  • Connected over /dev/ttyUSB0 at 38400
  • Ran (reboot) from the Awkernel serial shell
  • Confirmed the target rebooted and returned to the shell
  • Ran (ifconfig) and confirmed interface enumeration, including the igc-backed interfac

Notes for reviewers

  • Review intent is narrow: minimal polling datapath only.
  • Files changed are limited to:
    • awkernel_drivers/src/pcie.rs
    • awkernel_drivers/src/pcie/intel/igc.rs
    • awkernel_drivers/src/pcie/intel/igc/igc_defines.rs
  • The main runtime-sensitive pieces are:
    • PCIe endpoint/bridge bus-master enablement
    • single-queue TX descriptor submission/reclaim
    • RX descriptor consume/refill
  • Observability, IRQ buffering, multi-queue, and checksum offload are intentionally deferred to later PRs.

@ytakano ytakano requested a review from Copilot April 22, 2026 06:07
@ytakano ytakano marked this pull request as ready for review April 22, 2026 06:11
@ytakano ytakano requested review from atsushi421 and nokosaaan April 22, 2026 06:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial single-queue, polling-based TX/RX datapath for the Intel I225/I226 (igc) PCIe NIC, including DMA/bus-master enablement and minimal NetDevice wiring.

Changes:

  • Enable PCIe bus-mastering (device + bridge) needed for DMA.
  • Implement single-queue polling TX submission/reclaim and RX consume/refill, wired through send(), recv(), can_send(), and capabilities().
  • Add a few igc descriptor constants required for advanced TX descriptors.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
awkernel_drivers/src/pcie.rs Enables BUS_MASTER (and forwarding bits on bridges) so endpoints can DMA through bridges.
awkernel_drivers/src/pcie/intel/igc.rs Implements single-queue polling TX/RX datapath and integrates with the NetDevice trait.
awkernel_drivers/src/pcie/intel/igc/igc_defines.rs Adds constants for advanced TX descriptor encoding (DTYP + PAYLEN shift).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awkernel_drivers/src/pcie/intel/igc.rs
Comment thread awkernel_drivers/src/pcie/intel/igc.rs Outdated
Comment thread awkernel_drivers/src/pcie/intel/igc.rs Outdated
Comment thread awkernel_drivers/src/pcie/intel/igc.rs Outdated
Comment thread awkernel_drivers/src/pcie/intel/igc.rs
Comment thread awkernel_drivers/src/pcie/intel/igc.rs Outdated
Comment thread awkernel_drivers/src/pcie/intel/igc.rs
Comment thread awkernel_drivers/src/pcie/intel/igc.rs
Comment thread awkernel_drivers/src/pcie/intel/igc.rs Outdated
@atsushi421 atsushi421 self-requested a review April 25, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants