oxidecomputer / oxidecomputer/omicron

sled-agent's switch backend is a compile-time feature

Open
#11,202 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build development Sled Agent
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Softnpu scrimlets (e.g. omicron simulated, a4x2, voxel) require a custom build of omicron purely for the softnpu-compatible sled-agent.

The switch backend is always set to "switch-asic" at compile time: sled_mode_from_config (sled-agent bootstrap/pre_server.rs) always maps to a cfg feature chain with scrimlet = Tofino ASIC.

The only way around this is using --features switch-softnpu at build. CI already does this on every commit

https://github.com/oxidecomputer/omicron/blob/961d1d0dafd6141a34898a169c6c94b901b85a3a/.github/buildomat/jobs/package.sh#L33-L36

but it only exists as a job output in a 2.6GB package.tar.gz:

https://github.com/oxidecomputer/omicron/blob/961d1d0dafd6141a34898a169c6c94b901b85a3a/.github/buildomat/jobs/package.sh#L53-L69

This makes the softnpu sled-agent the only component of a softnpu dev environment with no published, pinned source. npuzone, dendrite-softnpu, etc. are all available independently.

The long-term fix discussed is that sled-agent should determine its switch backend at runtime from the hardware it's on (Tofino, softnpu, future builds). This will require coordinated work in dendrite as well (dpd's backend is likewise compile-time).

In the interim, #11133 makes the softnpu sled-agent available for individual download in the out/ directory, which allows softnpu-based labs to consume prebuilt images. Alternatively, we could put the file into TUF repos themselves (under some non-target, unknown kind location).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sled-agent/bootstrap/pre_server.rs and sled_mode_from_config to trace the compile-time switch-ASIC mapping, then inspect .github/buildomat/jobs/package.sh and interim issue #11133. The long-term result is runtime backend selection based on hardware, coordinated with dendrite's dpd backend; an interim result would publish a pinned softnpu sled-agent independently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.