Commit 9960d766 authored by Eric Dumazet's avatar Eric Dumazet Committed by Daniel Borkmann

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent d269176e
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* General test specific settings */ /* General test specific settings */
#define MAX_SUBTESTS 3 #define MAX_SUBTESTS 3
#define MAX_TESTRUNS 10000 #define MAX_TESTRUNS 1000
#define MAX_DATA 128 #define MAX_DATA 128
#define MAX_INSNS 512 #define MAX_INSNS 512
#define MAX_K 0xffffFFFF #define MAX_K 0xffffFFFF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment