Blame SOURCES/0062-extensions-hashlimit-Fix-tests-with-HZ-1000.patch

fea5c6
From 41660ba1faea8b7ebd71e94c70ef175a75ab91cc Mon Sep 17 00:00:00 2001
fea5c6
From: Phil Sutter <phil@nwl.cc>
fea5c6
Date: Mon, 8 Nov 2021 17:03:21 +0100
fea5c6
Subject: [PATCH] extensions: hashlimit: Fix tests with HZ=1000
fea5c6
fea5c6
In an attempt to fix for failing hashlimit tests with HZ=100, the
fea5c6
expected failures were changed so they are expected to pass and the
fea5c6
parameters changed to seemingly fix them. Yet while the new parameters
fea5c6
worked on HZ=100 systems, with higher tick rates they didn't so the
fea5c6
observed problem moved from the test failing on HZ=100 to failing on
fea5c6
HZ=1000 instead.
fea5c6
fea5c6
Kernel's error message "try lower: 864000000/5" turned out to be a red
fea5c6
herring: The burst value does not act as a dividor but a multiplier
fea5c6
instead, so in order to lower the overflow-checked value, a lower burst
fea5c6
value must be chosen. Inded, using a burst value of 1 makes the kernel
fea5c6
accept the rule in both HZ=100 and HZ=1000 configurations.
fea5c6
fea5c6
Fixes: bef9dc575625a ("extensions: hashlimit: Fix tests with HZ=100")
fea5c6
Signed-off-by: Phil Sutter <phil@nwl.cc>
fea5c6
(cherry picked from commit 1eab8e83aec0e6965f11f8cad460add1caeae629)
fea5c6
---
fea5c6
 extensions/libxt_hashlimit.t | 4 ++--
fea5c6
 1 file changed, 2 insertions(+), 2 deletions(-)
fea5c6
fea5c6
diff --git a/extensions/libxt_hashlimit.t b/extensions/libxt_hashlimit.t
fea5c6
index 8369933786f68..206d92935f2e2 100644
fea5c6
--- a/extensions/libxt_hashlimit.t
fea5c6
+++ b/extensions/libxt_hashlimit.t
fea5c6
@@ -3,12 +3,12 @@
fea5c6
 -m hashlimit --hashlimit-above 1000000/sec --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-above 1/min --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-above 1/hour --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
--m hashlimit --hashlimit-above 1/day --hashlimit-burst 500 --hashlimit-name mini1;=;OK
fea5c6
+-m hashlimit --hashlimit-above 1/day --hashlimit-burst 1 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1000000/sec --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/min --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/hour --hashlimit-burst 5 --hashlimit-name mini1;=;OK
fea5c6
--m hashlimit --hashlimit-upto 1/day --hashlimit-burst 500 --hashlimit-name mini1;=;OK
fea5c6
+-m hashlimit --hashlimit-upto 1/day --hashlimit-burst 1 --hashlimit-name mini1;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 1 --hashlimit-name mini1 --hashlimit-htable-expire 2000;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 1 --hashlimit-mode srcip --hashlimit-name mini1 --hashlimit-htable-expire 2000;=;OK
fea5c6
 -m hashlimit --hashlimit-upto 1/sec --hashlimit-burst 1 --hashlimit-mode dstip --hashlimit-name mini1 --hashlimit-htable-expire 2000;=;OK
fea5c6
-- 
fea5c6
2.33.0
fea5c6