Skip to content

Commit

Permalink
fix PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenggen-xu committed May 24, 2018
1 parent c4b7c38 commit dd793a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cfgmgr/buffermgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void BufferMgr::readPgProfileLookupFile(string file)
ifstream infile(file);
if (!infile.is_open())
{
m_pgfile_readable = false;
m_pgfile_processed = false;
SWSS_LOG_WARN("PG profile lookup file: %s is not readable", file.c_str());
return;
}
Expand Down Expand Up @@ -71,6 +71,7 @@ void BufferMgr::readPgProfileLookupFile(string file)
);
}

m_pgfile_processed = true;
infile.close();
}

Expand Down Expand Up @@ -213,7 +214,7 @@ void BufferMgr::doTask(Consumer &consumer)
task_status = doCableTask(fvField(i), fvValue(i));
}
// In case of PORT table update, Buffer Manager is interested in speed update only
if (m_pgfile_readable && table_name == CFG_PORT_TABLE_NAME && fvField(i) == "speed")
if (m_pgfile_processed && table_name == CFG_PORT_TABLE_NAME && fvField(i) == "speed")
{
// create/update profile for port
task_status = doSpeedUpdateTask(port, fvValue(i));
Expand Down
2 changes: 1 addition & 1 deletion cfgmgr/buffermgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BufferMgr : public Orch
Table m_cfgBufferProfileTable;
Table m_cfgBufferPgTable;
Table m_cfgLosslessPgPoolTable;
bool m_pgfile_readable = true;
bool m_pgfile_processed;

pg_profile_lookup_t m_pgProfileLookup;
port_cable_length_t m_cableLenLookup;
Expand Down

0 comments on commit dd793a5

Please sign in to comment.