Skip to content

When Bridge port is deleted treat L2 call back event AGED as FLUSH #2623

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 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions orchagent/fdborch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ void FdbOrch::update(sai_fdb_event_t type,
update.entry.bv_id = entry->bv_id;
update.type = "dynamic";
Port vlan;
char *platform = getenv("platform");

SWSS_LOG_INFO("FDB event:%d, MAC: %s , BVID: 0x%" PRIx64 " , \
bridge port ID: 0x%" PRIx64 ".",
Expand All @@ -301,6 +302,16 @@ void FdbOrch::update(sai_fdb_event_t type,
*/
SWSS_LOG_INFO("Flush event: Failed to get port by bridge port ID 0x%" PRIx64 ".",
bridge_port_id);
}
else if (((NULL != platform) && (strstr(platform, BRCM_PLATFORM_SUBSTRING))) &&
(type == SAI_FDB_EVENT_AGED))
{
/* Some Platforms like Broadcom, sends the BCM L2 delete call back as Aged event.
* if the bridge port is already deleted, to clean up the stale entries,
* consider it as FLUSH event */
SWSS_LOG_INFO("Flush event:Bridge port ID 0x%" PRIx64 " not available, considering age event as flush.",
bridge_port_id);
type = SAI_FDB_EVENT_FLUSHED;
} else {
SWSS_LOG_ERROR("Failed to get port by bridge port ID 0x%" PRIx64 ".",
bridge_port_id);
Expand Down