Skip to content

Commit

Permalink
swss: Fix egress queue counters in voq systems. (#2705)
Browse files Browse the repository at this point in the history
* In voq systems, the buffer profiles are defined on sysports.  So the
    phy ports do not have buffer queue config and queuesStateVector
    built by getQueueConfigurations in flexcounterorch never has phy
    ports in voq systems. So in voq systems, always enable egress queue
    counters.
  • Loading branch information
skbarista authored Mar 17, 2023
1 parent 5f031af commit 142abdf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6126,6 +6126,16 @@ void PortsOrch::generateQueueMapPerPort(const Port& port, FlexCounterQueueStates
}
else
{
// In voq systems, always install a flex counter for this egress queue
// to track stats. In voq systems, the buffer profiles are defined on
// sysports. So the phy ports do not have buffer queue config. Hence
// queuesStateVector built by getQueueConfigurations in flexcounterorch
// never has phy ports in voq systems. So always enabled egress queue
// counter on voq systems.
if (gMySwitchType == "voq")
{
addQueueFlexCountersPerPortPerQueueIndex(port, queueIndex, false);
}
queuePortVector.emplace_back(id, sai_serialize_object_id(port.m_port_id));
}
}
Expand Down

0 comments on commit 142abdf

Please sign in to comment.