Skip to content

Commit

Permalink
Adding extern_learn flag with fdb entry so that Kernel doesn't age ou…
Browse files Browse the repository at this point in the history
…t the MAC
  • Loading branch information
kishorekunal01 authored Dec 7, 2023
1 parent a1ce21f commit 981863e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fdbsyncd/fdbsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void FdbSync::updateLocalMac (struct m_fdb_info *info)

const std::string cmds = std::string("")
+ " bridge fdb " + op + " " + info->mac + " dev "
+ port_name + " master " + type + " vlan " + info->vid.substr(4);
+ port_name + " master " + type + " vlan " + info->vid.substr(4) + " extern_learn ";

std::string res;
int ret = swss::exec(cmds, res);
Expand Down Expand Up @@ -393,7 +393,7 @@ void FdbSync::addLocalMac(string key, string op)

const std::string cmds = std::string("")
+ " bridge fdb " + op + " " + mac + " dev "
+ port_name + " master " + type + " vlan " + vlan;
+ port_name + " master " + type + " vlan " + vlan + " extern_learn ";

std::string res;
int ret = swss::exec(cmds, res);
Expand Down Expand Up @@ -441,7 +441,7 @@ void FdbSync::updateMclagRemoteMac (struct m_fdb_info *info)

const std::string cmds = std::string("")
+ " bridge fdb " + op + " " + info->mac + " dev "
+ port_name + " master " + type + " vlan " + info->vid.substr(4);
+ port_name + " master " + type + " vlan " + info->vid.substr(4) + " extern_learn ";

std::string res;
int ret = swss::exec(cmds, res);
Expand Down Expand Up @@ -469,7 +469,7 @@ void FdbSync::updateMclagRemoteMacPort(int ifindex, int vlan, std::string mac)
{
const std::string cmds = std::string("")
+ " bridge fdb replace" + " " + mac + " dev "
+ port_name + " master static vlan " + to_string(vlan);
+ port_name + " master static vlan " + to_string(vlan) + " extern_learn ";

std::string res;
int ret = swss::exec(cmds, res);
Expand Down Expand Up @@ -520,7 +520,7 @@ void FdbSync::macRefreshStateDB(int vlan, string kmac)

const std::string cmds = std::string("")
+ " bridge fdb " + "replace" + " " + kmac + " dev "
+ port_name + " master " + type + " vlan " + to_string(vlan);
+ port_name + " master " + type + " vlan " + to_string(vlan) + " extern_learn ";

std::string res;
int ret = swss::exec(cmds, res);
Expand Down

0 comments on commit 981863e

Please sign in to comment.