Skip to content

Commit

Permalink
[fix] Use the same storm detection condition for queue occupancy non-…
Browse files Browse the repository at this point in the history
…zero case as the zero case (sonic-net#1111)

* Check if pfc is at on state over the polling period for queue occupany non-zero case

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Use the same condition for queue occupany zero and non-zero cases

Signed-off-by: Wenda Ni <wenni@microsoft.com>

* Remove single line comments that no longer valid
  • Loading branch information
wendani authored and qiluo-msft committed May 17, 2021
1 parent fb06c32 commit 7c6ebb1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions orchagent/pfc_detect_broadcom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ for i = n, 1, -1 do
pfc_on2off_last = tonumber(pfc_on2off_last)

-- Check actual condition of queue being in PFC storm
if (occupancy_bytes > 0 and packets - packets_last == 0 and pfc_rx_packets - pfc_rx_packets_last > 0) or
-- DEBUG CODE START. Uncomment to enable
(debug_storm == "enabled") or
-- DEBUG CODE END.
(occupancy_bytes == 0 and pfc_rx_packets - pfc_rx_packets_last > 0 and pfc_on2off - pfc_on2off_last == 0 and queue_pause_status_last == 'true' and queue_pause_status == 'true') then
if (pfc_rx_packets - pfc_rx_packets_last > 0 and pfc_on2off - pfc_on2off_last == 0 and queue_pause_status_last == 'true' and queue_pause_status == 'true') or
(debug_storm == "enabled") then
if time_left <= poll_time then
redis.call('PUBLISH', 'PFC_WD_ACTION', '["' .. KEYS[i] .. '","storm"]')
is_deadlock = true
Expand Down

0 comments on commit 7c6ebb1

Please sign in to comment.