Skip to content

Commit 525a57f

Browse files
Fix for remote system interface not getting created (#2364)
Signed-off-by: keesara <[email protected]>
1 parent 75fc965 commit 525a57f

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

orchagent/intfsorch.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ void IntfsOrch::doTask(Consumer &consumer)
678678

679679
if(table_name == CHASSIS_APP_SYSTEM_INTERFACE_TABLE_NAME)
680680
{
681-
if(!isRemoteSystemPortIntf(alias))
681+
if(isLocalSystemPortIntf(alias))
682682
{
683683
//Synced local interface. Skip
684684
it = consumer.m_toSync.erase(it);
@@ -1623,6 +1623,22 @@ bool IntfsOrch::isRemoteSystemPortIntf(string alias)
16231623
return false;
16241624
}
16251625

1626+
bool IntfsOrch::isLocalSystemPortIntf(string alias)
1627+
{
1628+
Port port;
1629+
if(gPortsOrch->getPort(alias, port))
1630+
{
1631+
if (port.m_type == Port::LAG)
1632+
{
1633+
return(port.m_system_lag_info.switch_id == gVoqMySwitchId);
1634+
}
1635+
1636+
return(port.m_system_port_info.type != SAI_SYSTEM_PORT_TYPE_REMOTE);
1637+
}
1638+
//Given alias is system port alias of the local port/LAG
1639+
return false;
1640+
}
1641+
16261642
void IntfsOrch::voqSyncAddIntf(string &alias)
16271643
{
16281644
//Sync only local interface. Confirm for the local interface and

orchagent/intfsorch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class IntfsOrch : public Orch
7070
bool updateSyncdIntfPfx(const string &alias, const IpPrefix &ip_prefix, bool add = true);
7171

7272
bool isRemoteSystemPortIntf(string alias);
73+
bool isLocalSystemPortIntf(string alias);
7374

7475
private:
7576

orchagent/neighorch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ void NeighOrch::doVoqSystemNeighTask(Consumer &consumer)
12031203

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

1206-
if(!gIntfsOrch->isRemoteSystemPortIntf(alias))
1206+
if(gIntfsOrch->isLocalSystemPortIntf(alias))
12071207
{
12081208
//Synced local neighbor. Skip
12091209
it = consumer.m_toSync.erase(it);

0 commit comments

Comments
 (0)