Skip to content

FIX ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY key unavailable in database #3868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

richardkuo1999
Copy link

@richardkuo1999 richardkuo1999 commented Apr 25, 2025

When excessive MAC addresses are learned and MAC ageout occurs, pre-fetched keys may become out of sync with the actual state.

What I did

  1. disable blocking , do not repeatedly try to get the value from the database
  2. Implemented try-except to prevent nbrshow termination on database access failure.
  3. Added checks for required keys in the dictionary to avoid access failures.

How to verify it

  1. Use scapy sending 30k of diffent ARP request packets from another device to the DUT
  2. wait the mac start ageout out and execute nbrshow -4 on the DUT
    • OR execute nbrshow -4 on the DUT and delete some ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY key from the ASIC_DB same time

Results:

Before:

Key '{ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000bd0","mac":"4E:5A:72:F3:09:04","switch_id":"oid:0x21000000000000"}}' unavailable in database '{ASIC_DB}'

After:

...
128.255.251.97   24:93:aa:8b:86:b1  -        100
192.168.0.254    78:18:ec:0d:83:eb  eth0     -
192.168.3.46     ac:1f:6b:37:51:a2  eth0     -
Total number of entries 28572

When excessive MAC addresses are learned and MAC ageout occurs, pre-fetched keys may become out of sync with the actual state.

What I did

1. disable blocking , do not repeatedly try to get the value from the database
2. Implemented try-except to prevent nbrshow termination on database access failure.
3. Added checks for required keys in the dictionary to avoid access failures.

How to verify it
1. Use scapy sending 30k of diffent ARP request packets from another device to the DUT
2. wait the mac start ageout out or execute "nbrshow -4" on the DUT and delete some ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY key from the ASIC_DB same time

Results:
Before:
Key '{ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000bd0","mac":"4E:5A:72:F3:09:04","switch_id":"oid:0x21000000000000"}}' unavailable in database '{ASIC_DB}'

After:
...
128.255.251.97   24:93:aa:8b:86:b1  -        100
192.168.0.254    78:18:ec:0d:83:eb  eth0     -
192.168.3.46     ac:1f:6b:37:51:a2  eth0     -
Total number of entries 28572
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

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