mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
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>
This commit is contained in:
parent
ca36960211
commit
d40bc96257
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue