Skip to content

Commit

Permalink
[portsorch]: Rename function isPortReady() to allPortsReady() (sonic-…
Browse files Browse the repository at this point in the history
…net#990)

Signed-off-by: Wenda Ni <[email protected]>
  • Loading branch information
wendani authored and Tony Titus committed Jul 31, 2019
1 parent 0231972 commit 3b7f8af
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,7 @@ void AclOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/copporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ void CoppOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
4 changes: 2 additions & 2 deletions orchagent/fdborch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void FdbOrch::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down Expand Up @@ -342,7 +342,7 @@ void FdbOrch::doTask(NotificationConsumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/flexcounterorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void FlexCounterOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void IntfsOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/mirrororch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ void MirrorOrch::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/neighorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void NeighOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/orchdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ bool OrchDaemon::init()

/*
* The order of the orch list is important for state restore of warm start and
* the queued processing in m_toSync map after gPortsOrch->isPortReady() is set.
* the queued processing in m_toSync map after gPortsOrch->allPortsReady() is set.
*
* For the multiple consumers in ports_tables, tasks for LAG_TABLE is processed before VLAN_TABLE
* when iterating ConsumerMap.
Expand Down
2 changes: 1 addition & 1 deletion orchagent/pfcwdorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void PfcWdOrch<DropHandler, ForwardHandler>::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/policerorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void PolicerOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
6 changes: 3 additions & 3 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ void PortsOrch::removeDefaultBridgePorts()
SWSS_LOG_NOTICE("Remove bridge ports from default 1Q bridge");
}

bool PortsOrch::isPortReady()
bool PortsOrch::allPortsReady()
{
return m_initDone && m_pendingPortSet.empty();
}
Expand Down Expand Up @@ -2374,7 +2374,7 @@ void PortsOrch::doTask(Consumer &consumer)
else
{
/* Wait for all ports to be initialized */
if (!isPortReady())
if (!allPortsReady())
{
return;
}
Expand Down Expand Up @@ -3225,7 +3225,7 @@ void PortsOrch::doTask(NotificationConsumer &consumer)
SWSS_LOG_ENTER();

/* Wait for all ports to be initialized */
if (!isPortReady())
if (!allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/portsorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PortsOrch : public Orch, public Subject
public:
PortsOrch(DBConnector *db, vector<table_name_with_pri_t> &tableNames);

bool isPortReady();
bool allPortsReady();
bool isInitDone();

map<string, Port>& getAllPorts();
Expand Down
2 changes: 1 addition & 1 deletion orchagent/qosorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ void QosOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/routeorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void RouteOrch::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/tunneldecaporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void TunnelDecapOrch::doTask(Consumer& consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down
4 changes: 2 additions & 2 deletions orchagent/watermarkorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void WatermarkOrch::doTask(Consumer &consumer)
{
SWSS_LOG_ENTER();

if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down Expand Up @@ -141,7 +141,7 @@ void WatermarkOrch::handleFcConfigUpdate(const std::string &key, const std::vect
void WatermarkOrch::doTask(NotificationConsumer &consumer)
{
SWSS_LOG_ENTER();
if (!gPortsOrch->isPortReady())
if (!gPortsOrch->allPortsReady())
{
return;
}
Expand Down

0 comments on commit 3b7f8af

Please sign in to comment.