Skip to content

Commit

Permalink
Always enable VoQ as well as TxQ stats for chassis.
Browse files Browse the repository at this point in the history
  • Loading branch information
vmittal-msft committed Feb 23, 2023
1 parent 96d56a5 commit 531094b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions orchagent/flexcounterorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ extern BufferOrch *gBufferOrch;
extern Directory<Orch*> gDirectory;
extern CoppOrch *gCoppOrch;
extern FlowCounterRouteOrch *gFlowCounterRouteOrch;
extern string gMySwitchType;

#define BUFFER_POOL_WATERMARK_KEY "BUFFER_POOL_WATERMARK"
#define PORT_KEY "PORT"
Expand Down Expand Up @@ -336,6 +337,11 @@ map<string, FlexCounterQueueStates> FlexCounterOrch::getQueueConfigurations()
std::vector<std::string> portQueueKeys;
m_bufferQueueConfigTable.getKeys(portQueueKeys);

if (gMySwitchType == "voq")
{
return queuesStateVector;
}

for (const auto& portQueueKey : portQueueKeys)
{
auto toks = tokenize(portQueueKey, '|');
Expand Down
2 changes: 1 addition & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6101,7 +6101,7 @@ void PortsOrch::generateQueueMapPerPort(const Port& port, FlexCounterQueueStates
{
/* voq counters are always enabled. There is no mechanism to disable voq
* counters in a voq system. */
if (!voq && !queuesState.isQueueCounterEnabled(queueRealIndex))
if (!(gMySwitchType == "voq") && !queuesState.isQueueCounterEnabled(queueRealIndex))
{
continue;
}
Expand Down

0 comments on commit 531094b

Please sign in to comment.