summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-02-28 08:39:20 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-02-28 17:49:18 +0100
commit9960d7669eaa42e82a2f4393adf549191de2e587 (patch)
tree49750e25e95281c96340234d2f71b2e0539fe2b1 /lib
parentd269176e766c71c998cb75b4ea8cbc321cc0019d (diff)
downloadlinux-stable-9960d7669eaa42e82a2f4393adf549191de2e587.tar.gz
linux-stable-9960d7669eaa42e82a2f4393adf549191de2e587.tar.bz2
linux-stable-9960d7669eaa42e82a2f4393adf549191de2e587.zip
test_bpf: reduce MAX_TESTRUNS
For tests that are using the maximal number of BPF instruction, each run takes 20 usec. Looping 10,000 times on them totals 200 ms, which is bad when the loop is not preemptible. test_bpf: #264 BPF_MAXINSNS: Call heavy transformations jited:1 19248 18548 PASS test_bpf: #269 BPF_MAXINSNS: ld_abs+get_processor_id jited:1 20896 PASS Lets divide by ten the number of iterations, so that max latency is 20ms. We could use need_resched() to break the loop earlier if we believe 20 ms is too much. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index e6f550608d72..2efb213716fa 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -28,7 +28,7 @@
/* General test specific settings */
#define MAX_SUBTESTS 3
-#define MAX_TESTRUNS 10000
+#define MAX_TESTRUNS 1000
#define MAX_DATA 128
#define MAX_INSNS 512
#define MAX_K 0xffffFFFF