bpf: samples: Do not touch RLIMIT_MEMLOCK
[linux-2.6-microblaze.git] / samples / bpf / xdp_adjust_tail_user.c
index ba482dc..a70b094 100644 (file)
@@ -82,7 +82,6 @@ static void usage(const char *cmd)
 
 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,
        };
@@ -143,11 +142,6 @@ int main(int argc, char **argv)
                }
        }
 
-       if (setrlimit(RLIMIT_MEMLOCK, &r)) {
-               perror("setrlimit(RLIMIT_MEMLOCK, RLIM_INFINITY)");
-               return 1;
-       }
-
        if (!ifindex) {
                fprintf(stderr, "Invalid ifname\n");
                return 1;