Skip to content

Codify commodity-hardware constraint: auto-fallback XDP mode + ADR amendment#20

Merged
thewillyhuman merged 1 commit into
mainfrom
feat/commodity-hardware-requirement
Apr 26, 2026
Merged

Codify commodity-hardware constraint: auto-fallback XDP mode + ADR amendment#20
thewillyhuman merged 1 commit into
mainfrom
feat/commodity-hardware-requirement

Conversation

@thewillyhuman

Copy link
Copy Markdown
Owner

Summary

Writes down what was already true in spirit: `lb-node` runs on any x86_64 / ARM64 Linux server with kernel ≥ 5.10. No SmartNIC, no vendor-specific driver flags, no DPDK toolchain, no kernel patches.

Two operational holes closed:

  • `deploy/xdp/load.sh` now defaults to `auto` mode — try `native` first, fall back to `skb` (generic kernel-side XDP) if the driver doesn't support it. SKB mode works on every Linux NIC since 5.10, at the cost of ~30–40% throughput. Operator gets a one-liner that just works on commodity hardware regardless of NIC vendor.
  • ADR-002 gains decision driver bgp: parse NOTIFICATIONs, enforce hold-timer, support TCP-MD5 auth #6 ("Commodity hardware") — spells out what's in (auto fallback, native/skb modes) and what's explicitly out (HW-mode offload, driver-private fast paths, DPDK). Future contributors have the rationale in writing.

Also updates README + operations.md to match (the README's stale "AF_XDP and DPDK backends" line was particularly load-bearing).

Test plan

  • `bash -n deploy/xdp/load.sh` — syntax clean
  • On a Linux box without native XDP support (e.g. veth), `sudo deploy/xdp/load.sh eth0` falls back to skb cleanly
  • On a Linux box with native support (Intel/Mellanox/AWS ENA), `sudo deploy/xdp/load.sh eth0` lands in native mode

🤖 Generated with Claude Code

The project's deployment target is "any x86_64 / ARM64 Linux server with
kernel >= 5.10" — no SmartNIC, no specific NIC vendor, no kernel
patches, no DPDK toolchain. This was already true in spirit (PR 8
deleted the DPDK backend, ADR-002 picked xdpilone over libbpf-rs to
keep the build dep footprint small) but wasn't written down.

Two operational consequences had been left implicit:

* `deploy/xdp/load.sh` defaulted to `native` mode, which fails on NICs
  whose drivers don't implement the XDP RX hook (older virtio, some
  embedded NICs, every veth device used in tests). Operators on
  commodity hardware would hit a confusing "operation not supported"
  on first attach.
* HW-mode XDP offload (Netronome / Corigine SmartNICs) had no docs
  flagging it as out-of-scope; nothing told a future contributor
  why it isn't a default.

Fixes:

* `load.sh` gains an `auto` mode (now the default): try `native` first,
  fall back to `skb` (generic kernel-side XDP) if the driver doesn't
  support it. SKB mode runs in the kernel's generic XDP hook so it
  works on every Linux NIC since 5.10, at the cost of ~30–40%
  throughput vs native. Operator output prints which mode it ended
  up using.
* `load.sh` detach loop now tries all three mode flags so re-runs are
  idempotent regardless of which mode was used last.
* ADR-002 gains a sixth decision driver — "Commodity hardware" —
  spelling out what's in (auto fallback, native/skb modes) and what's
  explicitly out (HW offload, driver-private fast paths, DPDK).
* README's stale "AF_XDP and DPDK backends" feature line replaced
  with the auto-fallback story; ADR-002 added to the docs list.
* `operations.md` AF_XDP setup section explains the auto mode and
  lists which commodity NICs get native vs skb.
* `smoke-test.sh` switches to passing `skb` explicitly (veth doesn't
  support native) with a comment on why.

After this change: `sudo deploy/xdp/load.sh eth0` is the one-liner
that works on any commodity Linux box, no NIC-vendor dance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thewillyhuman thewillyhuman merged commit 41bc44d into main Apr 26, 2026
7 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