-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
FDB entry not removed in case when remove port from VLAN #7538
Comments
Could you please wait for the ageout time - 10mts and check the DB? |
Waited 40 minutes after removing one interface from vlan. Both entries still present in FDB table. redis-cli -n 6 keys "FDB"
|
I believe this is one of the issues that were intended to be addressed by Broadcom's work on Layer 2 forwarding enhancements, with the following components: Related PRs: sonic-net/sonic-utilities#529 sonic-net/sonic-swss#1716 sonic-net/sonic-swss#885 |
sonic-net/sonic-swss#885 is closed, as all required changes have been split and upstreamed separately. I see the code is present to flush fdb when port is removed from vlan. Not sure why you are still seeing the issue. void FdbOrch::updateVlanMember(const VlanMemberUpdate& update)
|
I don't see that code being called when the port is removed from the vlan. But I do see lines like this: Jan 25 07:50:47.548674 r-panther-13 DEBUG swss#orchagent: :> update: enter What calling stack and sequence do you expect to reach FdbOrch::updateVlanMember? |
From PortsOrch::removeVlanMember: As part of this notification, fdborch will call FdbOrch::updateVlanMember |
I see that FdbOrch::updateVlanMember is called, but the FDB entry in STATE_DB is not cleared. Drilling down with gdb, I see that updateVlanMember calls flushFDBEntries. While stepping, I dumped the vlan member tables before and after the call to flushFDBEntries. Before: dump state vlan_member "Vlan247|Ethernet0" After: dump state vlan_member "Vlan247|Ethernet0" Both before and after: redis-cli -n 6 keys "FDB"
Something needs to trigger the removal of one of the above FDB entries. Is it the next line of updateVlanMember which calls notifyObserversFDBFlush, which calls notify in observer.h? This makes 3 calls to iter->update. The 3 functions are NeighOrch::update, MirrorOrch::update and MuxOrch::update. The last two don't seem relevant to this case and they do nothing. NeighOrch::update calls processFDBFlushUpdate which does find the port being removed from vlan in m_portsOrch->getPort(entry.bv_id, vlan). However, if it is expected that resolveNeighborEntry does the removing, this does not happen, because m_syncdNeighbors has 0 elements. From what I see, NeighOrch::addNeighbor and NeighOrch::removeNeighbor are the places where elements would be added to or removed from m_syncdNeighbors, but I do not hit breakpoints in these functions when adding or deleting a port from a vlan. The above is relevant if my guess is correct that notifyObserversFDBFlush is responsible for removing the FDB entry from STATE_DB. If not, please let me know where to look instead. |
@anilkpandey could you please reply to my latest comment so we can get to the bottom of this? |
Adam Yeung will follow up with BRCM team to provide more guidance on the issue investigation. |
A fdb flush call from orchagent sends flush request to SAI. When the mac is deleted in HW, a AGED notification is generated, which triggers the deletion of the fdb entry in ASIC_DB (by syncd) as well as STATE_DB (by fdborch). |
Thanks. I confirm that the MAC was deleted in HW and a notification reached SAI. I am continuing to investigate. Here are some lines of interest from syslog. INFO syncd#SDK: :- processSingleEvent: key: SAI_OBJECT_TYPE_FDB_FLUSH:oid:0x21000000000000 op: flush |
Hi @anilkpan, SAI is able to generate both SAI_FDB_EVENT_FLUSHED and SAI_FDB_EVENT_AGED, based on the event arriving from SDK. Our SDK sends FLUSHED in a scenario like the present one, where a member port is removed from a vlan. It sends AGED after a configurable amount of time with no traffic. Thus, where ports A and B are members in a vlan passing traffic, FLUSHED is generated when A is removed from the vlan, and AGED is only generated on B after some time with no traffic. I am surprised that you expect the AGED event to be generated when no aging occurs in this case. Is there a SONiC document that prescribes the use of AGED for this case? |
@raphaelt-nvidia, |
Description
FDB entry not removed in case when remove port from VLAN
Steps to reproduce the issue:
Describe the results you received:
In Redis output we have mac address for host connected to port which was removed from VLAN
Describe the results you expected:
In Redis output we do not have mac address for host connected to port which was removed from VLAN. When port removed from VLAN - peer MAC address removed also.
Output of
show version
:Output of
show techsupport
:The text was updated successfully, but these errors were encountered: