Skip to content

Feature/tofino backend#5

Merged
ymlei merged 3 commits into
mainfrom
feature/tofino_backend
Apr 15, 2026
Merged

Feature/tofino backend#5
ymlei merged 3 commits into
mainfrom
feature/tofino_backend

Conversation

@ymlei
Copy link
Copy Markdown
Collaborator

@ymlei ymlei commented Apr 14, 2026

Add Tofino2 hardware backend and refactor Mininet into backends/mininet/

New Tofino backend (openoptics/backends/tofino/):

  • SSH/SCP-based deployment pipeline with jump-host tunneling and
    parallel multi-ToR rollout
  • BFRt control plane driving P4 sources for the emulated OCS and the
    openoptics-tor data plane
  • Config-driven multi-ToR setup via TOML (config_4tor / config_4tor_2link)
    with apply_secrets.py overlay for testbed-specific values

Mininet refactor:

  • Move Mininet-specific P4 and BMv2 targets under openoptics/backends/mininet/
  • Prefix Mininet examples with mininet_ to disambiguate from Tofino variants
  • Update Dockerfile and docs to the new paths

Control-plane plumbing:

  • Backends now consume structured TableEntry objects instead of BMv2
    CLI strings
  • New supports_device_manager flag gates Thrift DeviceManager setup so
    Tofino can skip it cleanly
  • Backward-compatible time-slice duration handling (ms and us)

Routing and topology:

  • HoHo rewritten with Dijkstra-based optimal substructure (loop-free)
  • VLB gains a random-port sentinel for runtime dispatch on Tofino
  • round_robin / opera / shale accept a guardband flag; new
    from_schedule() and add_guardband() helpers

Testing:

  • Expanded unit coverage for the new routing algorithms and the
    TableEntry plumbing
  • Live Tofino integration tests for the published example scenarios

Yiming Lei added 3 commits April 14, 2026 12:39
Introduces openoptics/backends/tofino/ with SSH/SCP-based deployment,
BFRt control plane, P4 sources for emulated OCS and openoptics-tor, and
config-driven multi-ToR setup. Moves existing Mininet-specific P4 and
BMv2 targets under openoptics/backends/mininet/ and prefixes the
corresponding examples with mininet_. Refactors control-plane plumbing
so backends consume structured TableEntry objects instead of BMv2 CLI
strings, adds a supports_device_manager flag to gate Thrift setup, and
extends routing/topology with HoHo optimal-substructure, VLB random
sentinel, and guardband-aware schedules. Expands unit tests for the new
routing and TableEntry plumbing.
The openoptics-tor and emulated-ocs READMEs had drifted: hardcoded OCS
port tables, a non-existent init_tables() wrapper, and missing source
routing support. Sync the docs with the config-driven deployment flow
and the new ETHERTYPE_OPTICS_SR / time_flow_table_source path.
- Update example .rst includes to the mininet_ prefixed paths
- Add physical wiring ASCII diagrams for config_4tor and config_4tor_2link
- Add dashboard-for-telemetry item to the hardware status table as TODO
- Exclude tofino-backend-internals.md from the Sphinx build
- Enable myst_heading_anchors so intra-page links resolve
- Drop directory-only relative links that myst cannot resolve
@ymlei ymlei merged commit b6bc53f into main Apr 15, 2026
8 checks passed
@ymlei ymlei deleted the feature/tofino_backend branch April 15, 2026 17:05
ymlei added a commit that referenced this pull request Apr 15, 2026
* Add Tofino2 hardware backend and refactor Mininet into backends/mininet/

Introduces openoptics/backends/tofino/ with SSH/SCP-based deployment,
BFRt control plane, P4 sources for emulated OCS and openoptics-tor, and
config-driven multi-ToR setup. Moves existing Mininet-specific P4 and
BMv2 targets under openoptics/backends/mininet/ and prefixes the
corresponding examples with mininet_. Refactors control-plane plumbing
so backends consume structured TableEntry objects instead of BMv2 CLI
strings, adds a supports_device_manager flag to gate Thrift setup, and
extends routing/topology with HoHo optimal-substructure, VLB random
sentinel, and guardband-aware schedules. Expands unit tests for the new
routing and TableEntry plumbing.

* Update Tofino backend READMEs to match current code

The openoptics-tor and emulated-ocs READMEs had drifted: hardcoded OCS
port tables, a non-existent init_tables() wrapper, and missing source
routing support. Sync the docs with the config-driven deployment flow
and the new ETHERTYPE_OPTICS_SR / time_flow_table_source path.

* Update docs for Tofino backend and fix Sphinx build warnings

- Update example .rst includes to the mininet_ prefixed paths
- Add physical wiring ASCII diagrams for config_4tor and config_4tor_2link
- Add dashboard-for-telemetry item to the hardware status table as TODO
- Exclude tofino-backend-internals.md from the Sphinx build
- Enable myst_heading_anchors so intra-page links resolve
- Drop directory-only relative links that myst cannot resolve

---------
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