diff options
author | Eric Dumazet <edumazet@google.com> | 2018-02-26 19:52:46 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-02-26 21:06:56 +0100 |
commit | d40bc96257fe070796c63934913f95cc183016b0 (patch) | |
tree | b872eba57b4344a350001fdfed1884eff5ef87d3 /lib/test_bpf.c | |
parent | bpf: allow xadd only on aligned memory (diff) | |
download | linux-d40bc96257fe070796c63934913f95cc183016b0.tar.xz linux-d40bc96257fe070796c63934913f95cc183016b0.zip |
test_bpf: add a schedule point
test_bpf() is taking 1.6 seconds nowadays, it is time
to add a schedule point in it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'lib/test_bpf.c')
-rw-r--r-- | lib/test_bpf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/test_bpf.c b/lib/test_bpf.c index b4e22345963f..e6f550608d72 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -24,6 +24,7 @@ #include <linux/if_vlan.h> #include <linux/random.h> #include <linux/highmem.h> +#include <linux/sched.h> /* General test specific settings */ #define MAX_SUBTESTS 3 @@ -6582,6 +6583,7 @@ static __init int test_bpf(void) struct bpf_prog *fp; int err; + cond_resched(); if (exclude_test(i)) continue; |