Skip to content

[route] per-endpoint routing tables (RFD 662) - #182

Open
nicolaskagami wants to merge 3 commits into
mainfrom
nsk/662-modular-router-config
Open

nicolaskagami wants to merge 3 commits into
mainfrom
nsk/662-modular-router-config

Conversation

@nicolaskagami

@nicolaskagami nicolaskagami commented Nov 3, 2026 •

Copy link
Copy Markdown

Context

In order to implement RFD 662 - Modular Router Configuration, the switch needs to support separate routing contexts. For context, RFD 404 - Boundary Tunnel Routing defines how we use tunneling to achieve external reachability. We're modularizing external reachability (for tunneled traffic), not implementing VRFs.

This PR focuses on separating these routing contexts while keeping strong backwards compatibility. We'll now support multiple TEP endpoints, each redirecting to a separate router configuration (endpoint selection is done in OPTE). A "default" routing context is kept for backwards compatibility, allowing legacy APIs to remain functional. Thus, it's still used for both underlay routing and the default router configuration (which we'll likely want to remove later).

Internal Changes

  • Route lookup keys (router_v4_idx.rtr/router_v6_idx.rtr) are enriched with an exact match on ingress.router_id, used to select the routing context (lpm -> (exact, lpm)). Keys are now [rid, addr..., prefix_len] (6 bytes for IPv4, 18 for IPv6).
  • ingress.router_id (8 bits) is added to ingress metadata and defaults to 0.
  • The local action now takes a router id (one parameter byte) and associates the endpoint with it, enriching the packet metadata. Non-default tunnel endpoints use ids 1-255. Default endpoints and underlay use 0. IPv4 addresses always use 0.

scadm Changes

  • add-route4, remove-route4, add-route6, remove-route6 and add-address6 take --rid (default 0).
  • The table dump shows the router id of each local IPv6 address and route index entry.

Architectural decisions are discussed in the dendrite PR: oxidecomputer/dendrite#386

@nicolaskagami nicolaskagami self-assigned this Nov 3, 2026
@nicolaskagami
nicolaskagami force-pushed the nsk/662-modular-router-config branch 2 times, most recently from a08606d to 70e2f88 Compare November 3, 2026 22:39
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