Skip to content

Conversation

@zeeshanlakhani
Copy link

Implements the Multicast Routing Information Base (MRIB) for multicast support. The MRIB follows a two-table architecture (mrib_inmrib_loc) with RPF verification against the unicast RIB when sources are provided.

This PR includes:

  • rdb/src/db.rs: modifications to accomodate MRIB implementation and persistence
  • rdb/src/mrib/mod.rs: the core MRIB implementation with route storage and change notifications
  • rdb/src/mrib/rpf.rs: RPF verification using poptrie for O(1) LPM lookups, with rate-limited rebuilds triggered on unicast RIB changes
  • rdb/src/types.rs: Validated multicast address types with input validation
  • mg-api/src/lib.rs: API v3 (VERSION_MULTICAST_SUPPORT) with new endpoints
  • mgd/src/mrib_admin.rs: HTTP handlers bridging API to MRIB
  • mgadm/src/mrib.rs: CLI for MRIB inspection and configuration

Note that Omicron is source of truth multicast overlay/underlay groups/addresses.

@zeeshanlakhani zeeshanlakhani marked this pull request as draft December 8, 2025 08:58
@zeeshanlakhani zeeshanlakhani force-pushed the zl/mrib branch 3 times, most recently from 71919aa to 512b04d Compare December 8, 2025 11:52
Implements the Multicast Routing Information Base for multicast
support. The MRIB follows a two-table architecture (mrib_in → mrib_loc)
with RPF verification against the unicast RIB when sources are provided.

This PR includes:
  - `rdb/src/db.rs`: modifications to accomodate MRIB implementation and
    persistence
  - `rdb/src/mrib/mod.rs`: the core MRIB implementation with route storage and
    change notifications
  - `rdb/src/mrib/rpf.rs`: RPF verification using poptrie for O(1) LPM lookups,
    with rate-limited rebuilds triggered on unicast RIB changes
  - `rdb/src/types.rs`: Validated multicast address types with input validation
  - `mg-api/src/lib.rs`: API v3 (VERSION_MULTICAST_SUPPORT) with new endpoints
  - `mgd/src/mrib_admin.rs`: HTTP handlers bridging API to MRIB
  - `mgadm/src/mrib.rs`: CLI for MRIB inspection and configuration

Note that Omicron is source of truth multicast overlay/underlay
groups/addresses.
Comment on lines 8 to 15
use omicron_common::address::{
IPV4_ADMIN_SCOPED_MULTICAST_SUBNET, IPV4_GLOP_MULTICAST_SUBNET,
IPV4_LINK_LOCAL_MULTICAST_SUBNET, IPV4_MULTICAST_RANGE,
IPV4_SPECIFIC_RESERVED_MULTICAST_ADDRS, IPV4_SSM_SUBNET,
IPV6_ADMIN_SCOPED_MULTICAST_PREFIX, IPV6_INTERFACE_LOCAL_MULTICAST_SUBNET,
IPV6_LINK_LOCAL_MULTICAST_SUBNET, IPV6_MULTICAST_RANGE,
IPV6_RESERVED_SCOPE_MULTICAST_SUBNET, IPV6_SSM_SUBNET,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an omicron branch that goes alongside this?

The main reason I ask is because I want to make sure everything builds okay.

In my IPv6 work I noticed that there were some build failures due to circular dependencies in the rdb crate, so to break the dependency loop I ended up moving a bunch of the types that omicron imports into a new rdb_types crate. To get my omicron branch (not merged yet) to build, I had to update it to depend on rdb_types instead of rdb.

I'm not sure if omicron would require the same thing for your changes, but I want to make sure this isn't a problem here too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. I included that in Cargo.toml:

oximeter = { git = "https://github.com/oxidecomputer/omicron", branch = "zl/mcast-implicit-lifecycle" }
oximeter-producer = { git = "https://github.com/oxidecomputer/omicron", branch = "zl/mcast-implicit-lifecycle" }
oxnet = { version = "0.1.4", default-features = false, features = ["schemars", "serde"] }
omicron-common = { git = "https://github.com/oxidecomputer/omicron", branch = "zl/mcast-implicit-lifecycle" }

Copy link
Author

@zeeshanlakhani zeeshanlakhani Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, yeah, I'll check on the circular dependency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it'll work out, but I'll double-check this once we get the updates back in to Omicron.

@taspelund
Copy link
Contributor

Things are looking good overall. So far, I've been able to review everything except for rdb/src/db.rs and rdb/src/mrib/rpf.rs. I'll plan to pick up where I left off either tomorrow or Wednesday.

MRIB: API naming consistency and doc and validation fixes

Address PR #576 review feedback: rename MRIB functions to match
unicast patterns (get_mrib_*, read/update_mrib_*), fix stale doc
comments, make API more flexible, and minor cleanups.
@zeeshanlakhani zeeshanlakhani marked this pull request as ready for review December 17, 2025 05:52
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.

3 participants