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

[orchagent] Support for aggregrate VOQ Counters. #3047

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vector<table_name_wi
/* Initialize queue tables */
m_queueTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_QUEUE_NAME_MAP));
m_voqTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_VOQ_NAME_MAP));
m_voqToPortNamTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_PORT_NAME_VOQ_MAP));
m_queuePortTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_QUEUE_PORT_MAP));
m_queueIndexTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_QUEUE_INDEX_MAP));
m_queueTypeTable = unique_ptr<Table>(new Table(m_counter_db.get(), COUNTERS_QUEUE_TYPE_MAP));
Expand Down Expand Up @@ -7269,6 +7270,7 @@ void PortsOrch::generateQueueMapPerPort(const Port& port, FlexCounterQueueStates
vector<FieldValueTuple> queuePortVector;
vector<FieldValueTuple> queueIndexVector;
vector<FieldValueTuple> queueTypeVector;
vector<FieldValueTuple> voqToPortNameVector;
std::vector<sai_object_id_t> queue_ids;

if (voq)
Expand Down Expand Up @@ -7317,6 +7319,7 @@ void PortsOrch::generateQueueMapPerPort(const Port& port, FlexCounterQueueStates
// flexcounter orch logic. Always enabled voq counters.
addQueueFlexCountersPerPortPerQueueIndex(port, queueIndex, true);
queuePortVector.emplace_back(id, sai_serialize_object_id(port.m_system_port_oid));
voqToPortNameVector.emplace_back(id, port.m_system_port_info.alias);
}
else
{
Expand All @@ -7337,6 +7340,7 @@ void PortsOrch::generateQueueMapPerPort(const Port& port, FlexCounterQueueStates
if (voq)
{
m_voqTable->set("", queueVector);
m_voqToPortNamTable->set("", voqToPortNameVector);
}
else
{
Expand Down
1 change: 1 addition & 0 deletions orchagent/portsorch.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ class PortsOrch : public Orch, public Subject
unique_ptr<Table> m_gearboxTable;
unique_ptr<Table> m_queueTable;
unique_ptr<Table> m_voqTable;
unique_ptr<Table> m_voqToPortNamTable;
unique_ptr<Table> m_queuePortTable;
unique_ptr<Table> m_queueIndexTable;
unique_ptr<Table> m_queueTypeTable;
Expand Down
Loading