Skip to content

MRIB: Multicast RIB implementation#675

Open
zeeshanlakhani wants to merge 5 commits intomainfrom
zl/mrib
Open

MRIB: Multicast RIB implementation#675
zeeshanlakhani wants to merge 5 commits intomainfrom
zl/mrib

Conversation

@zeeshanlakhani
Copy link
Copy Markdown

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/mrib/mod.rs: core MRIB 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/db.rs: MRIB persistence with sled transactions
  • rdb/src/types.rs: validated multicast types (UnderlayMulticastIpv6, Vni)
  • mg-api/src/lib.rs: API v8 (VERSION_MULTICAST_SUPPORT) endpoints,
    following RFD 619 pattern (atop [mg-api] migrate to RFD 619 pattern #665)
  • mg-types/versions/src/multicast_support/: versioned API types
  • mgd/src/mrib_admin.rs: HTTP handlers bridging API to MRIB
  • mgadm/src/mrib.rs: CLI for MRIB inspection and configuration

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

References

  • Points to opte zl/filter-mcast-srcs branch for multicast source filtering support.

@zeeshanlakhani
Copy link
Copy Markdown
Author

@taspelund Just reopening this pointing back to main (I merged the previous PR into my multicast-e2e branch).

…ni type, sled transactions, merge main (665)

This is setup to come after #665 API modifications, but
uses the up-to-date setup and dropshot API manager.
@zeeshanlakhani zeeshanlakhani force-pushed the zl/mrib branch 3 times, most recently from 22b7b3e to 954f63a Compare March 31, 2026 22:31
)]
#[serde(try_from = "Ipv6Addr", into = "Ipv6Addr")]
#[schemars(transparent)]
pub struct UnderlayMulticastIpv6(Ipv6Addr);
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

In the DDM work, this will move to mg-common/src/net, but I'll handle that there (there's already enough here).

zeeshanlakhani added a commit that referenced this pull request Apr 2, 2026
…amming

Adds multicast group subscription distribution to the DDM exchange
protocol with a V4 version bump (frozen V3 types for wire compat).

Key changes:
- V4 exchange protocol with multicast support (V3 peers are unaffected)
- UnderlayMulticastIpv6 validated newtype moved to mg-common (ff04::/64) (moved from rdb types)
- MRIB->DDM sync in mg-lower/mrib.rs
- OPTE M2P table programming on learned multicast routes
- Atomic update_imported_mcast on Db (single lock for import/delete/diff, which is a bit different from the tunnel work)
- Collapsed send_update dispatch
- Shared pull handler helpers (collect_underlay_tunnel, collect_multicast)
- MulticastPathHop constructor
- Some serde round-trip and validation tests, including for version handling

Stacked on zl/mrib (MRIB: Multicast RIB implementation [#675](#675)).
zeeshanlakhani added a commit that referenced this pull request Apr 2, 2026
Adds multicast group subscription distribution to the DDM exchange
protocol with a V4 version bump (frozen V3 types for wire compat).

Key changes:
- V4 exchange protocol with multicast support (V3 peers are unaffected)
- UnderlayMulticastIpv6 validated newtype moved to mg-common (ff04::/64) (moved from rdb types)
- MRIB->DDM sync in mg-lower/mrib.rs
- OPTE M2P hooks for learned multicast routes (requires OPTE #924)
- Atomic update_imported_mcast on Db (single lock for import/delete/diff, which is a bit different from the tunnel work)
- Collapsed send_update dispatch
- Shared pull handler helpers (collect_underlay_tunnel, collect_multicast)
- MulticastPathHop constructor
- Some serde round-trip and validation tests, including for version handling

Stacked on zl/mrib (MRIB: Multicast RIB implementation [#675](#675)).
zeeshanlakhani added a commit that referenced this pull request Apr 2, 2026
Adds multicast group subscription distribution to the DDM exchange
protocol with a V4 version bump (frozen V3 types for wire compat).

Key changes:
- V4 exchange protocol with multicast support (V3 peers are unaffected)
- UnderlayMulticastIpv6 validated newtype moved to mg-common (ff04::/64) (moved from rdb types)
- MRIB->DDM sync in mg-lower/mrib.rs
- OPTE M2P hooks for learned multicast routes (requires OPTE #924)
- Atomic update_imported_mcast on Db (single lock for import/delete/diff, which is a bit different from the tunnel work)
- Collapsed send_update dispatch
- Shared pull handler helpers (collect_underlay_tunnel, collect_multicast)
- MulticastPathHop constructor
- Some serde round-trip and validation tests, including for version handling

Stacked on zl/mrib (MRIB: Multicast RIB implementation [#675](#675)).
zeeshanlakhani added a commit that referenced this pull request Apr 7, 2026
Adds multicast group subscription distribution to the DDM exchange
protocol with a V4 version bump (frozen V3 types for wire compat).

Key changes:
- V4 exchange protocol with multicast support (V3 peers are unaffected)
- UnderlayMulticastIpv6 validated newtype moved to mg-common (ff04::/64) (moved from rdb types)
- MRIB->DDM sync in mg-lower/mrib.rs
- OPTE M2P hooks for learned multicast routes (requires OPTE #924)
- Atomic update_imported_mcast on Db (single lock for import/delete/diff, which is a bit different from the tunnel work)
- Collapsed send_update dispatch
- Shared pull handler helpers (collect_underlay_tunnel, collect_multicast)
- MulticastPathHop constructor
- Some serde round-trip and validation tests, including for version handling

Stacked on zl/mrib (MRIB: Multicast RIB implementation [#675](#675)).
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.

2 participants