Repository navigation
[route] per-endpoint routing tables (RFD 662) - #182
Open
nicolaskagami wants to merge 3 commits into
Open
nicolaskagami wants to merge 3 commits into
nicolaskagami wants to merge 3 commits into
Conversation
…r-config # Conflicts: # Cargo.lock # softnpu/src/test.rs
1 of 8 tasks
nicolaskagami
force-pushed
the
nsk/662-modular-router-config
branch
2 times, most recently
from
November 3, 2026 22:39
a08606d to
70e2f88
Compare
nicolaskagami
marked this pull request as ready for review
November 4, 2026 12:21
nicolaskagami
requested review from
cfzimmerman,
rcgoodfellow and
zeeshanlakhani
November 4, 2026 12:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
router_v4_idx.rtr/router_v6_idx.rtr) are enriched with anexactmatch oningress.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 to0.localaction 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.scadmChangesadd-route4,remove-route4,add-route6,remove-route6andadd-address6take--rid(default0).Architectural decisions are discussed in the dendrite PR: oxidecomputer/dendrite#386