bpf: samples: Do not touch RLIMIT_MEMLOCK
[linux-2.6-microblaze.git] / samples / bpf / xdp_redirect_map_user.c
index 35e16de..31131b6 100644 (file)
@@ -96,7 +96,6 @@ static void usage(const char *prog)
 
 int main(int argc, char **argv)
 {
-       struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY};
        struct bpf_prog_load_attr prog_load_attr = {
                .prog_type      = BPF_PROG_TYPE_XDP,
        };
@@ -135,11 +134,6 @@ int main(int argc, char **argv)
                return 1;
        }
 
-       if (setrlimit(RLIMIT_MEMLOCK, &r)) {
-               perror("setrlimit(RLIMIT_MEMLOCK)");
-               return 1;
-       }
-
        ifindex_in = if_nametoindex(argv[optind]);
        if (!ifindex_in)
                ifindex_in = strtoul(argv[optind], NULL, 0);