Skip to content
Open
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
12 changes: 11 additions & 1 deletion fboss/agent/hw/sai/switch/SaiPortManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3216,7 +3216,17 @@ void SaiPortManager::clearStats(PortID port) {
}),
statsToClear.end());
portHandle->port->clearStats(statsToClear);
managerTable_->queueManager().clearStats(portHandle->configuredQueues);
// Clear all queues, not just configuredQueues. Where the port level out
// discard counter is derived from the per queue drop counters, a queue left
// out keeps outDiscards_ non-zero. configuredQueues covers only the port
// queue config, which is unicast only on XGS, so the multicast queues would
// never be cleared.
std::vector<SaiQueueHandle*> allQueues;
allQueues.reserve(portHandle->queues.size());
for (const auto& [_, queue] : portHandle->queues) {
allQueues.push_back(queue.get());
}
managerTable_->queueManager().clearStats(allQueues);

// Reset accumulated inDiscards counter in portStats_.
// inDiscards_ is a software-accumulated counter (+=) that is not
Expand Down
Loading