Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preventing dynamic generation of BUFFER_PROFILE and BUFFER_PG entries in CONFIG_DB #3418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cfgmgr/buffermgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ BufferMgr::BufferMgr(DBConnector *cfgDb, DBConnector *applDb, string pg_lookup_f
}

dynamic_buffer_model = false;
fixed_cable_speed_len = true;
}

//# speed, cable, size, xon, xoff, threshold, xon_offset
Expand Down Expand Up @@ -502,6 +503,12 @@ void BufferMgr::doTask(Consumer &consumer)
return;
}

if (fixed_cable_speed_len)
{
SWSS_LOG_DEBUG("Will not dynamically generate BUFFER_PG and BUFFER_PROFILE entries.");
return;
}

if (table_name == CFG_PORT_QOS_MAP_TABLE_NAME)
{
doPortQosTableTask(consumer);
Expand Down
6 changes: 6 additions & 0 deletions cfgmgr/buffermgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ class BufferMgr : public Orch

bool m_pgfile_processed;
bool dynamic_buffer_model;
/*
* True if cable lengths and speeds are predetermined. If it is true, we
* do not dynamically generate BUFFER_PROFILE and BUFFER_PG entries in
* APPL_DB (i.e., we just copy static entries from CONFIG_DB).
*/
bool fixed_cable_speed_len;

pg_profile_lookup_t m_pgProfileLookup;
port_cable_length_t m_cableLenLookup;
Expand Down
Loading