Skip to content

Commit ecabffd

Browse files
neethajohnraphaelt-nvidia
authored andcommitted
[pfcwd] Fix the polling interval time granularity (sonic-net#1912)
Fixes sonic-net/sonic-buildimage#8773 Pfcwd regressions were observed due to the changes in the PR sonic-net/sonic-sairedis#878. Hence aligning the polling interval in lua script to use microseconds **How I verified it** Ran pfcwd tests that were failing prior to this change and they passed
1 parent 361502c commit ecabffd

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

orchagent/pfc_detect_barefoot.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- KEYS - queue IDs
22
-- ARGV[1] - counters db index
33
-- ARGV[2] - counters table name
4-
-- ARGV[3] - poll time interval
4+
-- ARGV[3] - poll time interval (milliseconds)
55
-- return queue Ids that satisfy criteria
66

77
local counters_db = ARGV[1]
88
local counters_table_name = ARGV[2]
9-
local poll_time = tonumber(ARGV[3])
9+
local poll_time = tonumber(ARGV[3]) * 1000
1010

1111
local rets = {}
1212

orchagent/pfc_detect_broadcom.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- KEYS - queue IDs
22
-- ARGV[1] - counters db index
33
-- ARGV[2] - counters table name
4-
-- ARGV[3] - poll time interval
4+
-- ARGV[3] - poll time interval (milliseconds)
55
-- return queue Ids that satisfy criteria
66

77
local counters_db = ARGV[1]
88
local counters_table_name = ARGV[2]
9-
local poll_time = tonumber(ARGV[3])
9+
local poll_time = tonumber(ARGV[3]) * 1000
1010

1111
local rets = {}
1212

orchagent/pfc_detect_innovium.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- KEYS - queue IDs
22
-- ARGV[1] - counters db index
33
-- ARGV[2] - counters table name
4-
-- ARGV[3] - poll time interval
4+
-- ARGV[3] - poll time interval (milliseconds)
55
-- return queue Ids that satisfy criteria
66

77
local counters_db = ARGV[1]
88
local counters_table_name = ARGV[2]
9-
local poll_time = tonumber(ARGV[3])
9+
local poll_time = tonumber(ARGV[3]) * 1000
1010

1111
local rets = {}
1212

orchagent/pfc_detect_nephos.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-- KEYS - queue IDs
22
-- ARGV[1] - counters db index
33
-- ARGV[2] - counters table name
4-
-- ARGV[3] - poll time interval
4+
-- ARGV[3] - poll time interval (milliseconds)
55
-- return queue Ids that satisfy criteria
66

77
local counters_db = ARGV[1]
88
local counters_table_name = ARGV[2]
9-
local poll_time = tonumber(ARGV[3])
9+
local poll_time = tonumber(ARGV[3]) * 1000
1010

1111
local rets = {}
1212

0 commit comments

Comments
 (0)