Skip to content

Commit

Permalink
Fix for remote system interface not getting created (#2364)
Browse files Browse the repository at this point in the history
Signed-off-by: keesara <srikanth.keesara@nokia.com>
  • Loading branch information
skeesara-nokia authored Jul 27, 2022
1 parent 75fc965 commit 525a57f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
18 changes: 17 additions & 1 deletion orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,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 @@ -1623,6 +1623,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 @@ -70,6 +70,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

0 comments on commit 525a57f

Please sign in to comment.