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

Reduce severity of log to info in case of flush on non-existing member #1669

Merged
merged 1 commit into from
Mar 21, 2021
Merged
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
35 changes: 24 additions & 11 deletions orchagent/fdborch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,24 @@ void FdbOrch::update(sai_fdb_event_t type,
type, update.entry.mac.to_string().c_str(),
entry->bv_id, bridge_port_id);


if (bridge_port_id &&
!m_portsOrch->getPortByBridgePortId(bridge_port_id, update.port))
{
SWSS_LOG_ERROR("Failed to get port by bridge port ID 0x%" PRIx64 ".",
if (type == SAI_FDB_EVENT_FLUSHED)
{
/* In case of flush - can be ignored due to a race.
There are notifications about FDB FLUSH (syncd/sai_redis) on port,
which was already removed by orchagent as a result of
removeVlanMember action (removeBridgePort) */
SWSS_LOG_INFO("Flush event: Failed to get port by bridge port ID 0x%" PRIx64 ".",
bridge_port_id);

} else {
SWSS_LOG_ERROR("Failed to get port by bridge port ID 0x%" PRIx64 ".",
bridge_port_id);

}
return;
}

Expand Down Expand Up @@ -263,7 +276,7 @@ void FdbOrch::update(sai_fdb_event_t type,
{
/*port added back to vlan before we receive delete
notification for flush from SAI. Re-add entry to SAI
*/
*/
sai_attribute_t attr;
vector<sai_attribute_t> attrs;

Expand All @@ -286,7 +299,7 @@ void FdbOrch::update(sai_fdb_event_t type,

update.add = false;
if (!update.port.m_alias.empty())
{
{
update.port.m_fdb_count--;
m_portsOrch->setPort(update.port.m_alias, update.port);
}
Expand Down Expand Up @@ -1036,8 +1049,8 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
attr.value.ipaddr = ipaddr;
attrs.push_back(attr);
}
else if (macUpdate
&& (oldOrigin == FDB_ORIGIN_VXLAN_ADVERTIZED)
else if (macUpdate
&& (oldOrigin == FDB_ORIGIN_VXLAN_ADVERTIZED)
&& (fdbData.origin != oldOrigin))
{
/* origin is changed from Remote-advertized to Local-provisioned
Expand All @@ -1051,7 +1064,7 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
attrs.push_back(attr);
}

if (macUpdate && (oldOrigin == FDB_ORIGIN_VXLAN_ADVERTIZED))
if (macUpdate && (oldOrigin == FDB_ORIGIN_VXLAN_ADVERTIZED))
{
if ((fdbData.origin != oldOrigin)
|| ((oldType == "dynamic") && (oldType != fdbData.type)))
Expand All @@ -1062,7 +1075,7 @@ bool FdbOrch::addFdbEntry(const FdbEntry& entry, const string& port_name,
}
}


if (macUpdate)
{
SWSS_LOG_INFO("MAC-Update FDB %s in %s on from-%s:to-%s from-%s:to-%s origin-%d-to-%d",
Expand Down Expand Up @@ -1225,7 +1238,7 @@ bool FdbOrch::removeFdbEntry(const FdbEntry& entry, FdbOrigin origin)
(void)m_entries.erase(entry);

// Remove in StateDb
if (fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED)
if (fdbData.origin != FDB_ORIGIN_VXLAN_ADVERTIZED)
{
m_fdbStateTable.del(key);
}
Expand All @@ -1245,7 +1258,7 @@ bool FdbOrch::removeFdbEntry(const FdbEntry& entry, FdbOrigin origin)
return true;
}

void FdbOrch::deleteFdbEntryFromSavedFDB(const MacAddress &mac,
void FdbOrch::deleteFdbEntryFromSavedFDB(const MacAddress &mac,
const unsigned short &vlanId, FdbOrigin origin, const string portName)
{
bool found=false;
Expand All @@ -1268,7 +1281,7 @@ void FdbOrch::deleteFdbEntryFromSavedFDB(const MacAddress &mac,
if (iter->fdbData.origin == origin)
{
SWSS_LOG_INFO("FDB entry found in saved fdb. deleting..."
"mac=%s vlan_id=0x%x origin:%d port:%s",
"mac=%s vlan_id=0x%x origin:%d port:%s",
mac.to_string().c_str(), vlanId, origin,
itr.first.c_str());
saved_fdb_entries[itr.first].erase(iter);
Expand All @@ -1280,7 +1293,7 @@ void FdbOrch::deleteFdbEntryFromSavedFDB(const MacAddress &mac,
{
SWSS_LOG_INFO("FDB entry found in saved fdb, but Origin is "
"different mac=%s vlan_id=0x%x reqOrigin:%d "
"foundOrigin:%d port:%s, IGNORED",
"foundOrigin:%d port:%s, IGNORED",
mac.to_string().c_str(), vlanId, origin,
iter->fdbData.origin, itr.first.c_str());
}
Expand Down