[orchagent]: Consume FDB LEARN/AGED/MOVE events from ProducerStateTable - #4533
[orchagent]: Consume FDB LEARN/AGED/MOVE events from ProducerStateTable#4533xq9mend wants to merge 5 commits into
Conversation
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
50abedf to
b27e6e4
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…able Update src/sonic-sairedis to ae644aa9: Route FDB LEARN/AGED/MOVE events via ProducerStateTable for key-based dedup Update src/sonic-swss to 50abedff: Consume FDB LEARN/AGED/MOVE events from ProducerStateTable Related PRs: sonic-sairedis: sonic-net/sonic-sairedis#1875 sonic-swss: sonic-net/sonic-swss#4533 Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
…able Update src/sonic-sairedis to ae644aa9: Route FDB LEARN/AGED/MOVE events via ProducerStateTable for key-based dedup Update src/sonic-swss to 50abedff: Consume FDB LEARN/AGED/MOVE events from ProducerStateTable Related PRs: sonic-sairedis: sonic-net/sonic-sairedis#1875 sonic-swss: sonic-net/sonic-swss#4533 Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR moves FDB LEARN/AGED/MOVE handling toward an ASIC_DB ConsumerStateTable path so repeated MAC+BVID events can be deduplicated before FdbOrch processes them, while keeping notification handling for FLUSH and fallback events.
Changes:
- Adds
FDB_EVENT_STATEtable constant and registers a ConsumerStateTable executor in FdbOrch. - Adds
doTask(Consumer&)handling for deduplicated FDB event state entries. - Updates FDB notification-path comments and renames a local FDB type variable.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
orchagent/fdborch.h |
Defines the ASIC FDB event state table name. |
orchagent/fdborch.cpp |
Adds the new FDB event consumer and processing path, while retaining notification fallback handling. |
| * These arrive with key-based dedup — multiple events for same MAC+BVID | ||
| * are merged by ConsumerStateTable, solving the MAC flap memory storm. | ||
| */ | ||
| if (table_name == ASIC_FDB_EVENT_STATE_TABLE) |
| } | ||
| } | ||
|
|
||
| this->update(event_type, &fdb_entry, bridge_port_id, sai_fdb_type); |
Add ConsumerStateTable consumer for FDB_EVENT_STATE table in FdbOrch. LEARN/AGED/MOVE events are now dispatched via doTask(Consumer&) with key-based dedup, so MAC flap storms collapse to one entry per MAC+BVID. The existing NotificationConsumer path (PUBLISH/SUBSCRIBE) now handles only FLUSH events plus a fallback safety-net for any non-FLUSH events that arrive during transition or in ZeroMQ mode. Also renames the local sai_fdb_type variable to fdb_type in the NotificationConsumer loop to avoid shadowing. Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
6e4b95b to
4c6ea11
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
The installed saimetadata.h in CI has sai_deserialize_fdb_event with C-style signature (const char*, sai_fdb_event_t*). Use .c_str() and pass pointer to match. Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
4c6ea11 to
06840af
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
CI status: Same systemic vstest/p4rt infra failure as affecting all sonic-swss-common and related PRs since June 8. Not caused by this change. This PR consumes FDB LEARN/AGED/MOVE events from ProducerStateTable (companion to sonic-sairedis#1875) and is code-complete. Requesting a merge bypass given the known-broken vstest infra. CC @lolyu @croos12 @prsunny @Ndancejic |
Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
What I did
Add ConsumerStateTable consumer for FDB_EVENT_STATE table in FdbOrch. LEARN/AGED/MOVE events are now dispatched via doTask(Consumer&) with key-based dedup, so MAC flap storms collapse to one entry per MAC+BVID.
The existing NotificationConsumer path (PUBLISH/SUBSCRIBE) now handles only FLUSH events plus a fallback safety-net for any non-FLUSH events that arrive during transition or in ZeroMQ mode.
Also renames the local sai_fdb_type variable to fdb_type in the NotificationConsumer loop to avoid shadowing.
Why I did it
MAC flap storms generate a large number of FDB notifications for the same MAC+BVID in quick succession. With the previous PUBLISH path, each event was queued independently, causing memory pressure and processing delays. ProducerStateTable provides key-based deduplication: multiple events for the same MAC+BVID are merged so only the latest state is processed.
How I verified it
VS tests: all 15 FDB tests pass (test_fdb.py, test_fdbsync.py, test_fdb_update.py).
Details if related
Depends on sonic-sairedis change: sonic-net/sonic-sairedis#1875