aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Dumazet2018-02-26 10:52:46 -0800
committerDaniel Borkmann2018-02-26 21:06:56 +0100
commitd40bc96257fe070796c63934913f95cc183016b0 (patch)
treeb872eba57b4344a350001fdfed1884eff5ef87d3 /lib
parentca36960211eb228bcbc7aaebfa0d027368a94c60 (diff)
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')
-rw-r--r--lib/test_bpf.c2
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;