From 98a3ae81d21baf8803bf811a6912edee1b8bf387 Mon Sep 17 00:00:00 2001 From: Neetha John Date: Fri, 17 Sep 2021 19:58:42 -0700 Subject: [PATCH] [pfcwd] Fix the polling interval time granularity (#1912) Fixes Azure/sonic-buildimage#8773 Pfcwd regressions were observed due to the changes in the PR Azure/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 --- orchagent/pfc_detect_barefoot.lua | 4 ++-- orchagent/pfc_detect_broadcom.lua | 4 ++-- orchagent/pfc_detect_innovium.lua | 4 ++-- orchagent/pfc_detect_nephos.lua | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/orchagent/pfc_detect_barefoot.lua b/orchagent/pfc_detect_barefoot.lua index e77137b287..b270549a29 100644 --- a/orchagent/pfc_detect_barefoot.lua +++ b/orchagent/pfc_detect_barefoot.lua @@ -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 = {} diff --git a/orchagent/pfc_detect_broadcom.lua b/orchagent/pfc_detect_broadcom.lua index e7106cbd24..4f82b93317 100644 --- a/orchagent/pfc_detect_broadcom.lua +++ b/orchagent/pfc_detect_broadcom.lua @@ -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 = {} diff --git a/orchagent/pfc_detect_innovium.lua b/orchagent/pfc_detect_innovium.lua index 0f3800f638..436a825673 100644 --- a/orchagent/pfc_detect_innovium.lua +++ b/orchagent/pfc_detect_innovium.lua @@ -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 = {} diff --git a/orchagent/pfc_detect_nephos.lua b/orchagent/pfc_detect_nephos.lua index bd0cb3e769..d152fc5f8c 100644 --- a/orchagent/pfc_detect_nephos.lua +++ b/orchagent/pfc_detect_nephos.lua @@ -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 = {}