Skip to content

Commit

Permalink
orchagent: Setting port admin status Down by default (sonic-net#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng authored Oct 29, 2016
1 parent 87ac574 commit 02621bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ bool PortsOrch::setPortAdminStatus(sai_object_id_t id, bool up)
up ? "UP" : "DOWN", id);
return false;
}
SWSS_LOG_NOTICE("Set admin status %s to port pid:%llx",
up ? "UP" : "DOWN", id);
return true;
}

Expand Down Expand Up @@ -704,7 +706,7 @@ bool PortsOrch::initializePort(Port &p)
initializePriorityGroups(p);
initializeQueues(p);

/* Set up host interface */
/* Create host interface */
addHostIntfs(p.m_port_id, p.m_alias, p.m_hif_id);

// TODO: Assure if_nametoindex(p.m_alias.c_str()) != 0
Expand All @@ -719,8 +721,8 @@ bool PortsOrch::initializePort(Port &p)
}
#endif

/* Set port admin status UP */
setPortAdminStatus(p.m_port_id, true);
/* Set port admin status DOWN */
setPortAdminStatus(p.m_port_id, false);

return true;
}
Expand Down Expand Up @@ -751,6 +753,8 @@ bool PortsOrch::addHostIntfs(sai_object_id_t id, string alias, sai_object_id_t &
return false;
}

SWSS_LOG_NOTICE("Create host interface for port %s", alias.c_str());

return true;
}

Expand Down
2 changes: 2 additions & 0 deletions orchagent/tunneldecaporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ TunnelDecapOrch::TunnelDecapOrch(DBConnector *db, string tableName) : Orch(db, t
*/
void TunnelDecapOrch::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

auto it = consumer.m_toSync.begin();
while (it != consumer.m_toSync.end())
{
Expand Down

0 comments on commit 02621bc

Please sign in to comment.