Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

One build multiple ASICs

未关闭
#355 1 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 2 天内回复

@cfzimmerman 已经在做这个了。

开始于 2026年9月4日。

评估

这个 Issue 还没有评估数据。

描述

Dendrite currently supports multiple ASICs

  • Tofino: The Tofino 2 ASIC
  • Tofino Stub: mocks responses, keeps some state, no data plane
  • Softnpu: A virtual ASIC that runs in hypervisors and as a standalone software data plane.
  • Chaos: similar to tofino stub but probabilistically returns errors, primarily used for testing error handling in complex/compound operations that require many underlying ASIC operations.

Each of these ASICs lives within their own cargo feature, meaning dendrite is always compiled for a particular ASIC. This makes a lot of sense for the ASICs we have today. Only one is for production use and everything else is for testing. However there are two factors motivating a rethink.

  1. We have new production ASIC coming on the scene with the X2
  2. There is a desire to package and treat softnpu as a first class ASIC for e2e testing environments (see the discussion in omicron#11133).

It's worth noting that a single dpd will likely never be managing multiple switch ASICs at once (much less multiple different switch ASICs at once), so the compile time choice of ASIC is still a reasonable path forward from that perspective. We could package and deliver multiple dpd binaries, and it would be the responsibility of the control plane to detect what hardware is present and launch the correct dpd daemon. However, that seems like a complexity leak. If Dendrite is responsible for managing and abstracting switching hardware, then we should not be punting on detection responsibility.

One could imagine a meta-daemon of some kind that is responsible for hardware detection and launching the correct type of dpd binary for the ASIC in play. However at that point we're probably at a comparable amount of work to having a single dpd binary that can handle multiple ASICs. Having one less daemon to manage is definitely a benefit. Another benefit of this approach is that fracturing the codebase over cargo features per ASIC is a bit cumbersome to deal with. It would be nice to have cargo check/build/nextest and the LSP just operating over the whole codebase rather than having to do everything multiple times and constantly reconfigure the LSP for work that touches multiple ASICs.

With all the above considerations, I think we should be moving toward a one build multiple ASIC approach. For softnpu in the near term and for X2 in the medium term.

主要语言
Rust
星标
22
派生
4
平均合并
4 天 9 小时
30 天内合并 PR
7

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

oxidecomputer/dendrite 的其他 Issue

查看 oxidecomputer/dendrite 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。