Skip to content

feat(saiserver): implement SAI FDB entry CRUD and event pub/sub - #769

Open
thineshvs-google wants to merge 1 commit into
openconfig:mainfrom
thineshvs-google:l2-chunk4-fdb-entry-crud
Open

thineshvs-google wants to merge 1 commit into
openconfig:mainfrom
thineshvs-google:l2-chunk4-fdb-entry-crud

Conversation

@thineshvs-google

Copy link
Copy Markdown
Contributor

Part 4 of 9 for upstreaming L2 VLAN, bridge learning, and FDB support (splitting #722 into self-contained PRs under 150 LOC each; tracked in b/575886032).

Summary of Changes

  • dataplane/saiserver/fdb.go:
    • Add subscriber management (subscribe, sendNotification) on fdb to broadcast FdbEventNotificationResponse events (FDB_EVENT_LEARNED, FDB_EVENT_AGED) to active notification channels.
    • Implement CreateFdbEntry and CreateFdbEntries to resolve the target BridgePortId OID to its physical PortId via attrmgr, program the unicast MAC forwarding entry (PACKET_FIELD_NUM_ETHER_MAC_DST -> TransmitAction(portID)) into the "fdb" table, and emit FDB_EVENT_LEARNED.
    • Implement RemoveFdbEntry and RemoveFdbEntries to remove the MAC entry from both the internal fwdbridge.Table learned-MAC cache (brTable.Remove(mac)) and the dataplane "fdb" table, and emit FDB_EVENT_AGED.
  • dataplane/saiserver/bridge_test.go:
    • Add TestCreateAndRemoveFdbEntry verifying FDB entry creation, removal, and LEARNED / AGED notification delivery.
  • dataplane/saiserver/BUILD:
    • Add //dataplane/forwarding/fwdtable/bridge dependency to saiserver.

Testing

  • bazel test //dataplane/saiserver/...

@thineshvs-google
thineshvs-google requested a review from a team as a code owner October 22, 2026 06:14
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