oxidecomputer / oxidecomputer/softnpu
scadm shouldn't hardcode legacy virtio 9p device ID for SoftNPU
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 17
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
scadm finds propolis SoftNPU 9p devices by matching device ID 0x1009 with a legacy subsystem ID. Changing subsystem ID to single out SoftNPU from other 9p devices breaks scadm's lookup and vio9p binding.
Moving the device to transitional or modern virtio with device ID 0x1049 will also break lookup. Both of these things came up as blockers in https://github.com/oxidecomputer/omicron/pull/11237.
scadm should discover a device without depending on PCI identity. Similar to how the aforementioned PR approaches it, we can walk devinfo for virtio 9p nodes that accept both 0x1009 and 0x1049, and identify SoftNPU by its version string (9P2000.P4) with a Tversion exchange.
This is the same text as the issue on the propolis side: https://github.com/oxidecomputer/propolis/issues/1214
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing scadm's current SoftNPU lookup and how it walks devinfo for virtio 9p nodes. Support both device IDs, then use a Tversion exchange to identify the 9P2000.P4 device; done means lookup and vio9p binding still work when PCI subsystem or virtio device identity changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100