Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress storm detect counter increment for ongoing pfc storm case during a warm reboot #869

Merged
merged 4 commits into from
Jun 4, 2019
Merged
Changes from 3 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))
wendani marked this conversation as resolved.
Show resolved Hide resolved
{
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