Skip to content

[syncd]: Route FDB LEARN/AGED/MOVE events via ProducerStateTable for key-based dedup - #1875

Open
xq9mend wants to merge 6 commits into
sonic-net:masterfrom
xq9mend:fix/fdb-producer-state-table
Open

[syncd]: Route FDB LEARN/AGED/MOVE events via ProducerStateTable for key-based dedup#1875
xq9mend wants to merge 6 commits into
sonic-net:masterfrom
xq9mend:fix/fdb-producer-state-table

Conversation

@xq9mend

@xq9mend xq9mend commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Route FDB LEARN/AGED/MOVE events via ProducerStateTable for key-based dedup.

Adds REDIS_TABLE_FDB_EVENT_STATE define in sairediscommon.h. Passes m_dbAsic to NotificationProcessor constructor from Syncd.

FLUSH events continue via PUBLISH/NotificationProducer (existing path). LEARN/AGED/MOVE events use ProducerStateTable (key-based dedup). ProducerStateTable provides MAC-keyed deduplication so rapid flap storms for the same MAC+BVID collapse to one entry instead of flooding the notification queue.

Fallback to PUBLISH is retained when m_fdbEventStateProducer is null (ZeroMQ mode).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend

xq9mend commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

@lolyu @croos12

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

xq9mend added a commit to xq9mend/sonic-buildimage that referenced this pull request Apr 30, 2026
…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>
@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from e4bc7b4 to 050ed30 Compare April 30, 2026 05:51
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

xq9mend added a commit to xq9mend/sonic-buildimage that referenced this pull request Apr 30, 2026
…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>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 050ed30 to 149b97a Compare April 30, 2026 06:20
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 149b97a to 18b9014 Compare April 30, 2026 07:29
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 18b9014 to ebf146d Compare April 30, 2026 21:16
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lolyu

lolyu commented May 1, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 28f9fea to 83b97d2 Compare May 4, 2026 05:43
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 83b97d2 to 4b213de Compare May 7, 2026 17:50
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

xq9mend added 2 commits June 17, 2026 01:35
Split FDB notification handling in NotificationProcessor:
- FLUSH events continue via PUBLISH/NotificationProducer (existing path)
- LEARN/AGED/MOVE events use ProducerStateTable (key-based dedup)

ProducerStateTable provides MAC-keyed deduplication so rapid
flap storms for the same MAC+BVID collapse to one entry instead
of flooding the notification queue.

Fallback to PUBLISH is retained when m_fdbEventStateProducer is
null (ZeroMQ mode).

Adds REDIS_TABLE_FDB_EVENT_STATE define in sairediscommon.h.
Passes m_dbAsic to NotificationProcessor constructor from Syncd.

Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
…essor

Cover the three new code paths added in process_on_fdb_event:
- FdbLearnGoesToProducerStateTable: LEARN event writes to _FDB_EVENT_STATE:key
- FdbAgedDeletesFromProducerStateTable: AGED event deletes the scratch key
- FdbFlushDoesNotWriteToProducerStateTable: FLUSH event goes via PUBLISH

Each test creates a NotificationProcessor with dbAsic to initialize
m_fdbEventStateProducer, then verifies the Redis state after
syncProcessNotification().

Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 4b213de to 7a4a5b8 Compare June 17, 2026 01:36
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

… tests

Replace per-key del calls with dbAsic->flushdb() at the end of each
new NotificationProcessor test. This ensures the entire ASIC_DB is
clean after our tests run, preventing any Redis state pollution that
could affect FlexCounter or other tests running in the same process.

Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
@xq9mend
xq9mend force-pushed the fix/fdb-producer-state-table branch from 7a4a5b8 to 7ecf93f Compare June 23, 2026 04:04
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@xq9mend

xq9mend commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-sairedis

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

Retrying failed(or canceled) stages in build 1146339:

✅Stage BuildTrixie:

  • Job amd64: retried.

✅Stage Test:

  • Job vstest: retried.

@xq9mend

xq9mend commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

CI status: All checks pass except vstest, which has been failing across all sonic-swss-common and related PRs since June 8 due to a systemic p4rt infrastructure issue in the sonic-net CI pool (unrelated to this PR's code). This affects every open PR in the affected repos — confirmed across independent PRs #4690/#4691/#4693 and others. The failure is not caused by this change.

This PR routes FDB LEARN/AGED/MOVE events via ProducerStateTable 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>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Signed-off-by: xq9mend <xq9mend@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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