-
Notifications
You must be signed in to change notification settings - Fork 499
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
[fdborch] Fix FDB flush issues #2136
[fdborch] Fix FDB flush issues #2136
Conversation
0f8d83e
to
dda2284
Compare
dda2284
to
50944f6
Compare
50944f6
to
840a96a
Compare
can you please check the coverage - https://dev.azure.com/mssonic/build/_build/results?buildId=87118&view=codecoverage-tab You may want to add the VS test to cover the missing flows. |
e2bf849
to
7a9625c
Compare
0c404e2
to
1ab0895
Compare
Signed-off-by: Oleksandr Kolomeiets <oleksandrx.kolomeiets@intel.com>
8eeb58b
to
e22d21c
Compare
@Praveen-Brcm, can you please help review this as well. |
@gechiang, @Praveen-Brcm, please review the changes. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@oleksandrx-kolomeiets can you please take care of the EasyCLA check? There was an email sent to the community on how todo this one time registration which you need to do before the check can pass... @Praveen-Brcm Gentle reminder for you to review this PR. |
@gechiang : Changes looks good. |
@msosyak, @gechiang, @Praveen-Brcm, thank you for the review! |
* [fdborch] Fix FDB flush issues Signed-off-by: Oleksandr Kolomeiets <oleksandrx.kolomeiets@intel.com> * Fix coverage * Fix test_FdbAddedAfterMemberCreated. * Fix flush_syncd_notif_ut.cpp.
* [fdborch] Fix FDB flush issues Signed-off-by: Oleksandr Kolomeiets <oleksandrx.kolomeiets@intel.com> * Fix coverage * Fix test_FdbAddedAfterMemberCreated. * Fix flush_syncd_notif_ut.cpp.
* [fdborch] Fix FDB flush issues Signed-off-by: Oleksandr Kolomeiets <oleksandrx.kolomeiets@intel.com> * Fix coverage * Fix test_FdbAddedAfterMemberCreated. * Fix flush_syncd_notif_ut.cpp.
What I did
Add a flag to FDB entry to ensure that only the requested FDB entries will be deleted on flush notification.
Why I did it
In the mclag scenario, restart one of a pair of leaf switches. After completing the information exchange between leaf switches, the leaf switch will flush the fdb and then add the fdb, and then if the downlink port down, the fdb will be redirected.
At this point, a bug may appear:
ERR swss#orchagent: :- meta_sai_validate_fdb_entry: object key SAI_OBJECT_TYPE_FDB_ENTRY:{"bvid":"oid:0x26000000000943","mac":"B4:56:B9:F0:00:3E","switch_id":"oid:0x21000000000000"} already exists
ERR swss#orchagent: :- addFdbEntry: Failed to create dynamic FDB b4:56:b9:f0:00:3e on Ethernet16, rv:-6
analysis:
flush fdb, there are three steps
If between step 1 and step 3, fdborch processes the event of adding fdb, it may cause the fdb cache in sairedis to be incorrect or the entries in ASIC_DB are incorrect.
In this way, subsequent additions and deletions will cause larger e exceptions.
How I verified it
flush fdb
add fdb to APPL_DB immediately
set this fdb again after
Details if related
Similar fix can be found in this PR #1470, but it has some flaws as mentioned in the comments.