Skip to content

add tests for LRU-dedup notification queue for FDB events#24848

Open
senthil-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:add-tests-lru-dedup-notification-queue
Open

add tests for LRU-dedup notification queue for FDB events#24848
senthil-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:add-tests-lru-dedup-notification-queue

Conversation

@senthil-nexthop
Copy link
Copy Markdown
Contributor

Description of PR

Adds tests/fdb/test_fdb_churn.py — functional + storm validation for the LRU-dedup queue policy + op-allowlist + per-consumer COUNTERS_DB stats described in HLD: sonic-net/SONiC#2334

The suite covers functional correctness: verify LRU+dedup preserves end-state correctness for FDB events.

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Approach

What is the motivation for this PR?

Under the presence of FDB mac move storm, the memory usage of Orchagent grows unbounded. These tests validate the mitigation strategy discussed in the HLD linked above.

How did you do it?

test what it exercises
test_fdb_repeated_learn_dedup 5 identical LEARNs collapse correctly; STATE_DB + lru_pushed accounted
test_fdb_learn_delete_relearn LEARN → sonic-clear fdb (DELETE) → re-LEARN; the intervening DELETE clears the LRU map entry so the second LEARN is a fresh push (reframed from AGE since the chassis has no runtime aging-time knob without swssconfig restart)
test_fdb_port_move_not_deduped LEARN-on-A vs LEARN-on-B carry different bridge_port_id → distinct payloads → not deduped; end state is port B
test_fdb_mac_ping_pong 50-cycle A↔B + final-direction reinforcement; end state matches last LEARN; lru_pushed >= cycles
test_fdb_distinct_macs_bulk_learn 1000 unique MACs admitted; dedup hit rate stays low (mostly-distinct workload)
test_fdb_flush_during_learn sonic-clear fdb all reaches the FdbOrch:flush consumer (channel FLUSHFDBREQUEST, FIFO policy) while LEARN consumer is dedup-active

How did you verify/test it?

Tested manually.

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

t0, for vlan configuration

@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: Senthil Krishnamurthy <senthil@nexthop.ai>
@senthil-nexthop senthil-nexthop force-pushed the add-tests-lru-dedup-notification-queue branch from 6a070c5 to fd02cbf Compare May 25, 2026 21:08
@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.

2 participants