Skip to content

[softnpu, mcast] wire up the softnpu backend for multicast table ops - #405

Open
zeeshanlakhani wants to merge 2 commits into
zl/mcast-swadmfrom
zl/mcast-softnpu
Open

zeeshanlakhani wants to merge 2 commits into
zl/mcast-swadmfrom
zl/mcast-softnpu

Conversation

@zeeshanlakhani

Copy link
Copy Markdown
Contributor

Previously, SoftNPU didn't interact with multicast. mc_group_create and mc_port_add returned a stubbed OperationUnsupported, and port remove/destroy were no-ops.

With bitmap-based replication in p4rs (#240), SoftNPU can replicate off of port bitmaps carried in the replication table entry itself. On the Tofino, membership subscriptions live in the PRE and change independently of match-action state. In the SoftNPU work, membership is captured at write time, and a membership mutation means rewriting the affected replication entries (when triggered).

Includes:

  • asic/SoftNPU:
    • Live replication entries are tracked per group and rewritten when members are added/removed. The replication tracking lock covers both the snapshot and table updates.
    • Source filter, mcast NAT (tagged and untagged), egress decap, and mcast src MAC tables now map onto their sidecar-lite tables respectively.
      • egress.asic_id_to_port maps ASIC port IDs to logical port numbers for indexing the decap bitmap (same as on Tofino).
    • TableRemove is sent before TableAdd because p4rs drops an add whose key already exists and keeps the older entry (action and params).
  • dpd/mcast:
    • mcast::reset deletes each known group's entries before the table clears. SoftNPU's Table::clear is still a stub.
    • del_entries_where skips the stale-entry table sweep when the backend cannot list entries (e.g., in SoftNPU).
  • softnpu-lib is pinned to zl/multicast @ softnpu#183, which pulls in p4#240. SoftNPU loads sidecar-lite#152 at runtime.

Previously, SoftNPU didn't interact with multicast. `mc_group_create`
and `mc_port_add` returned a stubbed `OperationUnsupported`, and port
remove/destroy were no-ops.

With bitmap-based replication in p4rs ([#240](oxidecomputer/p4#240)),
SoftNPU can replicate off of port bitmaps carried in the replication
table entry itself. On the Tofino, membership subscriptions live in the
PRE and change independently of match-action state. In the SoftNPU work,
membership is captured at write time, and a membership mutation means
rewriting the affected replication entries (when triggered).

Includes:

- *asic/SoftNPU*:
  - Live replication entries are tracked per group and rewritten when
    members are added/removed. The replication tracking lock covers
    both the snapshot and table updates.
  - Source filter, mcast NAT (tagged and untagged), egress decap, and
    mcast src MAC tables now map onto their sidecar-lite tables
    respectively.
    - `egress.asic_id_to_port` maps ASIC port IDs to logical port
      numbers for indexing the decap bitmap (same as on Tofino).
  - `TableRemove` is sent before `TableAdd` because p4rs drops an
    add whose key already exists and keeps the older entry
    (action and params).
- *dpd/mcast*:
  - `mcast::reset` deletes each known group's entries before
    the table clears. SoftNPU's `Table::clear` is still a stub.
  - `del_entries_where` skips the stale-entry table sweep when the backend
    cannot list entries (e.g., in SoftNPU).
- softnpu-lib is pinned to `zl/multicast` @ softnpu#183, which pulls in
  p4#240. SoftNPU loads sidecar-lite#152 at runtime.
@zeeshanlakhani
zeeshanlakhani added this pull request to stack #401 October 15, 2026 13:38
@zeeshanlakhani zeeshanlakhani self-assigned this Oct 15, 2026
@zeeshanlakhani zeeshanlakhani added the multicast Multicast-related feature/impl label Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multicast Multicast-related feature/impl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant