Skip to content
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 & PortsOrch] Flush LAG FDB entry when LAG state changes to down #964

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

Conversation

RichardWu-Hebut
Copy link
Contributor

1. update PortsOrch, add SUBJECT_TYPE_PORT_STATUS_CHANGE to notify
port status change
2. FdbOrch will invoke SAI to flush the FDB entry when receive
SUBJECT_TYPE_PORT_STATUS_CHANGE

Signed-off-by: Richard Wu wutong23@baidu.com

What I did
PortsOrch and FdbOrch are enhanced to flush FDB entry when state change from up to down

  1. Add new event named with "SUBJECT_TYPE_PORT_STATUS_CHANGE " to identify port status change.
    2, Enhance PortsOrch to handle admin & oper status of LAG from APP DB, and send lag status update notification by SUBJECT_TYPE_PORT_STATUS_CHANGE event when receiving update from teamsyncd.
    3, Enhance FdbOrch to handle SUBJECT_TYPE_PORT_STATUS_CHANGE, the action of down state is invoking SAI to flush FDB entry on this port.

Why I did it
When the LAG change status from up to down, the FDB on LAG still exists, not flushed.

How I verified it

  1. Create a LAG, and add two member into this LAG.
  2. start LACP on the peer ports.
  3. Trigger ARP learning by ping.
  4. stop the LACP on the peer ports.
  5. After the LACP timeout, the LAG status is change to down state, check by "teamshow", then check the FDB entry in ASIC DB of step 3 is cleared.
  6. Check the sairedis record, make sure the flush FDB entry API is invoked.

Details if related

    1. update PortsOrch, add SUBJECT_TYPE_PORT_STATUS_CHANGE to notify
    port status change
    2. FdbOrch will invoke SAI to flush the FDB entry when receive
    SUBJECT_TYPE_PORT_STATUS_CHANGE

Signed-off-by: Richard Wu <wutong23@baidu.com>
@prsunny prsunny self-requested a review as a code owner September 2, 2022 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants