Skip to content

feat(fs5.5): add e1000 tcp transport proof#71

Merged
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration
Mar 20, 2026
Merged

feat(fs5.5): add e1000 tcp transport proof#71
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration

Conversation

@adybag14-cyber
Copy link
Owner

@adybag14-cyber adybag14-cyber commented Mar 20, 2026

Summary by CodeRabbit

  • New Features

    • Added TCP probe support for E1000 networking, enabling validation of bounded TCP handshakes, payload delivery, and connection teardown.
  • Tests

    • Introduced test cases for TCP segment send/receive operations and complete TCP handshake sequences over E1000.
  • Chores

    • Enhanced CI/CD workflows with optional TCP validation steps; updated documentation to reflect expanded protocol coverage.

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7836cdab-ecd0-4751-b481-c4e0df13817f

📥 Commits

Reviewing files that changed from the base of the PR and between f8f7e00 and ba963ba.

📒 Files selected for processing (11)
  • .github/workflows/release-preview.yml
  • .github/workflows/zig-ci.yml
  • README.md
  • build.zig
  • docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md
  • docs/zig-port/PHASE_CHECKLIST.md
  • docs/zig-port/PORT_PLAN.md
  • docs/zig-port/ZAR_VS_ZIGOS_E1000_SLICE_PLAN.md
  • scripts/baremetal-qemu-e1000-tcp-probe-check.ps1
  • src/baremetal_main.zig
  • src/pal/net.zig

📝 Walkthrough

Walkthrough

This PR extends E1000 baremetal networking support to include bounded TCP protocol reuse. Changes include new CI workflow steps for TCP probe validation, updated documentation reflecting expanded scope, a new PowerShell script for QEMU-based TCP testing, a build flag for TCP probe inclusion, and implementation of TCP probe logic with corresponding tests in the baremetal and PAL layers.

Changes

Cohort / File(s) Summary
CI Workflow Updates
.github/workflows/release-preview.yml, .github/workflows/zig-ci.yml
Added optional bare-metal QEMU E1000 TCP probe step to validate job, invoking the new baremetal-qemu-e1000-tcp-probe-check.ps1 script.
Documentation
README.md, docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md, docs/zig-port/PHASE_CHECKLIST.md, docs/zig-port/PORT_PLAN.md, docs/zig-port/ZAR_VS_ZIGOS_E1000_SLICE_PLAN.md
Updated E1000 adoption slice scope, host regression coverage, and QEMU probe evidence lists to include bounded TCP handshake/payload/teardown alongside ARP/IPv4/UDP; marked TCP probe status as completed and HTTP/HTTPS as next phase.
Build Configuration
build.zig
Added new boolean build option baremetal-e1000-tcp-probe (defaulting to false) and threaded into freestanding image build options.
TCP Probe Script
scripts/baremetal-qemu-e1000-tcp-probe-check.ps1
New PowerShell script implementing E1000 TCP baremetal smoke test under QEMU, with toolchain resolution, ELF compilation/linking, disk image creation, QEMU execution with timeout handling, and exit code validation.
TCP Probe Implementation
src/baremetal_main.zig, src/pal/net.zig
Implemented TCP probe logic in baremetal layer including error types, session builders/acceptors, frame validation, and connection state verification; added PAL/net tests exercising TCP segment send/receive and full handshake with payload exchange over e1000 mock device.

Sequence Diagram

sequenceDiagram
    actor CI as CI Workflow
    participant Build as Build System
    participant PSScript as baremetal-qemu-e1000-tcp-probe-check.ps1
    participant QEMU as QEMU + E1000
    participant TcpProbe as TCP Probe Handler
    participant Verify as Verification Logic

    CI->>Build: Run build step with<br/>e1000_tcp_probe flag
    Build->>PSScript: Invoke TCP probe script
    
    PSScript->>PSScript: Resolve toolchain<br/>(Zig, Clang, LLD, QEMU)
    PSScript->>PSScript: Compile PVH shim<br/>with Clang
    PSScript->>PSScript: Link final ELF<br/>with LLD
    PSScript->>QEMU: Launch QEMU with<br/>E1000 user-net config
    
    QEMU->>TcpProbe: Initialize E1000 device
    TcpProbe->>TcpProbe: Send SYN segment
    QEMU-->>TcpProbe: Receive SYN-ACK
    TcpProbe->>TcpProbe: Send ACK segment
    TcpProbe->>TcpProbe: Send payload
    QEMU-->>TcpProbe: Receive payload ACK
    TcpProbe->>TcpProbe: Send FIN segment
    QEMU-->>TcpProbe: Receive FIN-ACK
    TcpProbe->>TcpProbe: Send ACK to close
    
    TcpProbe->>Verify: Validate frames,<br/>flags, seq/ack numbers
    Verify->>Verify: Check connection state<br/>and counters
    Verify->>QEMU: Exit with probe code
    
    QEMU-->>PSScript: Return exit code
    PSScript->>PSScript: Validate exit code<br/>against expected value
    PSScript-->>CI: Report results and<br/>log paths
Loading

Possibly related issues

  • #1: This PR directly implements bounded TCP probe and support for the clean-room E1000 path, advancing the FS5.5 E1000 networking validation work with new script, build flag, baremetal TCP probe logic, and PAL network tests.

Possibly related PRs

  • #69: Extends earlier E1000 probe/integration by adding TCP-specific probe, tests, script, and build option that build upon the same baremetal e1000 codepaths and CI/documentation infrastructure.

Poem

🐰 TCP handshakes now bloom o'er E1000's weave,
Bounded segments dance, as protocols believe,
From SYN to ACK, the payload finds its way,
The clean-room driver hops—hop hop—hooray! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fs55-ethernet-integration

Comment @coderabbitai help to get the list of available commands and usage tips.

@adybag14-cyber adybag14-cyber merged commit 9de4e7f into main Mar 20, 2026
16 checks passed
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.

1 participant