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

Fix for System interface for remote asic LAG not getting created if received prior to SYSTEM_LAG creation from Chassis DB #2364

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
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
18 changes: 17 additions & 1 deletion orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ void IntfsOrch::doTask(Consumer &consumer)

if(table_name == CHASSIS_APP_SYSTEM_INTERFACE_TABLE_NAME)
{
if(!isRemoteSystemPortIntf(alias))
if(isLocalSystemPortIntf(alias))
{
//Synced local interface. Skip
it = consumer.m_toSync.erase(it);
Expand Down Expand Up @@ -1546,6 +1546,22 @@ bool IntfsOrch::isRemoteSystemPortIntf(string alias)
return false;
}

bool IntfsOrch::isLocalSystemPortIntf(string alias)
{
Port port;
if(gPortsOrch->getPort(alias, port))
{
if (port.m_type == Port::LAG)
{
return(port.m_system_lag_info.switch_id == gVoqMySwitchId);
}

return(port.m_system_port_info.type != SAI_SYSTEM_PORT_TYPE_REMOTE);
}
//Given alias is system port alias of the local port/LAG
return false;
}

void IntfsOrch::voqSyncAddIntf(string &alias)
{
//Sync only local interface. Confirm for the local interface and
Expand Down
1 change: 1 addition & 0 deletions orchagent/intfsorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class IntfsOrch : public Orch
bool updateSyncdIntfPfx(const string &alias, const IpPrefix &ip_prefix, bool add = true);

bool isRemoteSystemPortIntf(string alias);
bool isLocalSystemPortIntf(string alias);

private:

Expand Down
2 changes: 1 addition & 1 deletion orchagent/neighorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ void NeighOrch::doVoqSystemNeighTask(Consumer &consumer)

string alias = key.substr(0, found);

if(!gIntfsOrch->isRemoteSystemPortIntf(alias))
if(gIntfsOrch->isLocalSystemPortIntf(alias))
{
//Synced local neighbor. Skip
it = consumer.m_toSync.erase(it);
Expand Down