Skip to content
Merged
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
21 changes: 15 additions & 6 deletions orchagent/pfcactionhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,23 @@ void PfcWdActionHandler::initCounters(void)
}

auto wdQueueStats = getQueueStats(m_countersTable, sai_serialize_object_id(m_queue));
wdQueueStats.detectCount++;
// initCounters() is called when the event channel receives
// a storm signal. This can happen when there is a true new storm or
// when there is an existing storm ongoing before warm-reboot. In the latter case,
// we treat the storm as an old storm. In particular,
// we do not increment the detectCount so as to clamp the
// gap between detectCount and restoreCount by 1 at maximum
if (!(wdQueueStats.detectCount > wdQueueStats.restoreCount))
{
wdQueueStats.detectCount++;

wdQueueStats.txPktLast = 0;
wdQueueStats.txDropPktLast = 0;
wdQueueStats.rxPktLast = 0;
wdQueueStats.rxDropPktLast = 0;
}
wdQueueStats.operational = false;

wdQueueStats.txPktLast = 0;
wdQueueStats.txDropPktLast = 0;
wdQueueStats.rxPktLast = 0;
wdQueueStats.rxDropPktLast = 0;

updateWdCounters(sai_serialize_object_id(m_queue), wdQueueStats);
}

Expand Down