Skip to content

Commit 7c6ebb1

Browse files
wendaniqiluo-msft
authored andcommitted
[fix] Use the same storm detection condition for queue occupancy non-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 <[email protected]> * Use the same condition for queue occupany zero and non-zero cases Signed-off-by: Wenda Ni <[email protected]> * Remove single line comments that no longer valid
1 parent fb06c32 commit 7c6ebb1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

orchagent/pfc_detect_broadcom.lua

+2-5
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,8 @@ for i = n, 1, -1 do
6767
pfc_on2off_last = tonumber(pfc_on2off_last)
6868

6969
-- Check actual condition of queue being in PFC storm
70-
if (occupancy_bytes > 0 and packets - packets_last == 0 and pfc_rx_packets - pfc_rx_packets_last > 0) or
71-
-- DEBUG CODE START. Uncomment to enable
72-
(debug_storm == "enabled") or
73-
-- DEBUG CODE END.
74-
(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
70+
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
71+
(debug_storm == "enabled") then
7572
if time_left <= poll_time then
7673
redis.call('PUBLISH', 'PFC_WD_ACTION', '["' .. KEYS[i] .. '","storm"]')
7774
is_deadlock = true

0 commit comments

Comments
 (0)