Skip to content

Commit dca78d8

Browse files
[Fdbsyncd] Bug Fix for remote MAC move to local MAC and Fix for Static MAC advertisement in EVPN. (sonic-net#2521)
- What I did On local MAC learning, update the MAC entry as local then delete the DST entry from the Kernel for remote MAC. This will make sure that FRR doesn't reinstall the remote MAC(sonic-net#12363) When installing the static MAC in the kernel set the sticky flag as well. (sonic-net#12419) - How I did it Move the DST entry delete code after the MAC update code.(sonic-net#12363) Pass sticky flag to the kernel in fdbsyncd code.((sonic-net#12419) - How to verify it Tested MAC move from remote to local and verified the MAC is local in Kernel.(sonic-net#12363) Verified in Kernel that sticky bit is set and the same as advertised by FRR in the network.((sonic-net#12419) Signed-off-by: [email protected]
1 parent 28aa309 commit dca78d8

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

fdbsyncd/fdbsync.cpp

+12-8
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,6 @@ void FdbSync::updateLocalMac (struct m_fdb_info *info)
307307
op = "replace";
308308
port_name = info->port_name;
309309
fdb_type = info->type;
310-
/* Check if this vlan+key is also learned by vxlan neighbor then delete learned on */
311-
if (m_mac.find(key) != m_mac.end())
312-
{
313-
macDelVxlanEntry(key, info);
314-
SWSS_LOG_INFO("Local learn event deleting from VXLAN table DEL_KEY %s", key.c_str());
315-
macDelVxlan(key);
316-
}
317310
}
318311
else
319312
{
@@ -335,7 +328,7 @@ void FdbSync::updateLocalMac (struct m_fdb_info *info)
335328
}
336329
else
337330
{
338-
type = "static";
331+
type = "sticky static";
339332
}
340333

341334
const std::string cmds = std::string("")
@@ -347,6 +340,17 @@ void FdbSync::updateLocalMac (struct m_fdb_info *info)
347340

348341
SWSS_LOG_INFO("cmd:%s, res=%s, ret=%d", cmds.c_str(), res.c_str(), ret);
349342

343+
if (info->op_type == FDB_OPER_ADD)
344+
{
345+
/* Check if this vlan+key is also learned by vxlan neighbor then delete the dest entry */
346+
if (m_mac.find(key) != m_mac.end())
347+
{
348+
macDelVxlanEntry(key, info);
349+
SWSS_LOG_INFO("Local learn event deleting from VXLAN table DEL_KEY %s", key.c_str());
350+
macDelVxlan(key);
351+
}
352+
}
353+
350354
return;
351355
}
352356

0 commit comments

Comments
 (0)