samples/bpf: set resource limit to infinity.
Subsystems (3)
PATCH 1/1 samples/bpf: set resource limit to infinity.
Signed-off-by William Tu <[email protected]>
--- samples/bpf/test_maps.c | 4 ++++ 1 file changed, 4 insertions(+)
samples/bpf/test_maps.c +4 -0
@@ -16,6 +16,7 @@#include <assert.h> #include <sys/wait.h> #include <stdlib.h> +#include <sys/resource.h> #include "libbpf.h" static int map_flags;
@@ -483,6 +484,9 @@ static void run_all_tests(void)int main (void ) { +struct rlimit r = {RLIM_INFINITY ,RLIM_INFINITY }; + +setrlimit (RLIMIT_MEMLOCK , &r); map_flags =0 ;run_all_tests (); map_flags =BPF_F_NO_PREALLOC ;
Signature · 1 line
2.5.0
Quoted 1 line · William Tu
Signed-off-by William Tu <[email protected]>
please provide a proper patch description next time. subj line alone is not enough.
Not only explain 'what' the patch does, but 'why' as well.
Hi Alexei,
Thanks. I will do it next time.
William
Quoted 9 lines · Alexei Starovoitov
Quoted 1 line · William Tu
Signed-off-by William Tu <[email protected]>please provide a proper patch description next time. subj line alone is not enough.
Not only explain 'what' the patch does, but 'why' as well.