Skip to content

Commit

Permalink
[pfcwd] Convert polling interval from ms to us in LUA scripts
Browse files Browse the repository at this point in the history
PFCWD storm detection and restoration LUA scripts require values in microseconds.
Due to recent changes polling interval is now passed in milliseconds by "FlexCounter".
sonic-net/sonic-sairedis#878

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
  • Loading branch information
volodymyrsamotiy committed Sep 14, 2021
1 parent 8cf355d commit eeb2a75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions orchagent/pfc_detect_mellanox.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-- KEYS - queue IDs
-- ARGV[1] - counters db index
-- ARGV[2] - counters table name
-- ARGV[3] - poll time interval
-- ARGV[3] - poll time interval (milliseconds)
-- return queue Ids that satisfy criteria

local counters_db = ARGV[1]
local counters_table_name = ARGV[2]
local poll_time = tonumber(ARGV[3])
local poll_time = tonumber(ARGV[3]) * 1000

local rets = {}

Expand Down
4 changes: 2 additions & 2 deletions orchagent/pfc_restore.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
-- KEYS - queue IDs
-- ARGV[1] - counters db index
-- ARGV[2] - counters table name
-- ARGV[3] - poll time interval
-- ARGV[3] - poll time interval (milliseconds)
-- return queue Ids that satisfy criteria

local counters_db = ARGV[1]
local counters_table_name = ARGV[2]
local poll_time = tonumber(ARGV[3])
local poll_time = tonumber(ARGV[3]) * 1000

local rets = {}

Expand Down

0 comments on commit eeb2a75

Please sign in to comment.