Skip to content

Fix cold ARP packet delivery#401

Merged
ryanbreen merged 1 commit into
mainfrom
feat/arp-pending-queue
May 31, 2026
Merged

Fix cold ARP packet delivery#401
ryanbreen merged 1 commit into
mainfrom
feat/arp-pending-queue

Conversation

@ryanbreen
Copy link
Copy Markdown
Owner

Summary

  • queue outbound IPv4 packets on ARP miss instead of dropping the first TCP SYN
  • flush pending packets when ARP learns a sender mapping
  • mask the pending queue lock with irq_save/irq_restore for TX vs NetRx softirq access

Validation

  • cargo build --release --features testing,external_test_bins --bin qemu-uefi (0 warning/error lines)
  • cold Parallels autorun bssh to 10.211.55.2: ARP miss -> authenticated -> Darwin -> rc=0 -> PID 8 exit
  • inbound SSH to Breenix ran nested outbound bssh to 10.0.1.210: Darwin, rc=0, ssh_exit=0
  • NetRx samples after cycle stayed balanced: sample 2 ENTRY=81 EXIT=81 HELD=0; sample 3 ENTRY=82 EXIT=82 HELD=0; sample 4 ENTRY=82 EXIT=82 HELD=0

Artifacts: /Users/wrb/Downloads/Ralph/breenix-interrupt-io-roadmap-1780056222/turn98-artifacts/arp-pending-queue/proof-summary.md

Note: cargo fmt --check currently fails on unrelated pre-existing formatting/trailing-whitespace issues in tests/shared_qemu.rs and other files; this PR leaves them untouched.

Queue outbound IPv4 packets while ARP resolves the next-hop MAC, then flush them when ARP learns the sender mapping. Mask the pending queue lock because TX and NetRx softirq ARP handling both touch it.

Validated with cold same-subnet bssh autorun to 10.211.55.2 and an inbound SSH session that ran nested outbound bssh to 10.0.1.210; NetRx softirq entry/exit stayed balanced with processing held at zero.

Co-authored-by: Ryan Breen <ryan@breen.com>

Co-authored-by: Claude Code <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit f2cc76c into main May 31, 2026
@ryanbreen ryanbreen deleted the feat/arp-pending-queue branch May 31, 2026 16:44
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