diff --git a/orchagent/flexcounterorch.cpp b/orchagent/flexcounterorch.cpp index a48bd9ceb7..81006ea324 100644 --- a/orchagent/flexcounterorch.cpp +++ b/orchagent/flexcounterorch.cpp @@ -24,6 +24,7 @@ extern BufferOrch *gBufferOrch; extern Directory gDirectory; extern CoppOrch *gCoppOrch; extern FlowCounterRouteOrch *gFlowCounterRouteOrch; +extern string gMySwitchType; #define BUFFER_POOL_WATERMARK_KEY "BUFFER_POOL_WATERMARK" #define PORT_KEY "PORT" @@ -336,6 +337,11 @@ map FlexCounterOrch::getQueueConfigurations() std::vector portQueueKeys; m_bufferQueueConfigTable.getKeys(portQueueKeys); + if (gMySwitchType == "voq") + { + return queuesStateVector; + } + for (const auto& portQueueKey : portQueueKeys) { auto toks = tokenize(portQueueKey, '|'); diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 371136b8fa..3c31652e80 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -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; }