aboutsummaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdp1_user.c
diff options
context:
space:
mode:
authorRoman Gushchin <[email protected]>2020-12-01 21:59:00 +0000
committerAlexei Starovoitov <[email protected]>2020-12-03 02:32:47 +0000
commit5b0764b2d34510bc87d33a580da98f77789ac36f (patch)
treebd80a792599f564fcbcf074a0e7618a9d71b2fd8 /samples/bpf/xdp1_user.c
parentbpf: Eliminate rlimit-based memory accounting for bpf progs (diff)
downloadkernel-5b0764b2d34510bc87d33a580da98f77789ac36f.tar.gz
kernel-5b0764b2d34510bc87d33a580da98f77789ac36f.zip
bpf: samples: Do not touch RLIMIT_MEMLOCK
Since bpf is not using rlimit memlock for the memory accounting and control, do not change the limit in sample applications. Signed-off-by: Roman Gushchin <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'samples/bpf/xdp1_user.c')
-rw-r--r--samples/bpf/xdp1_user.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/samples/bpf/xdp1_user.c b/samples/bpf/xdp1_user.c
index c447ad9e3a1d..116e39f6b666 100644
--- a/samples/bpf/xdp1_user.c
+++ b/samples/bpf/xdp1_user.c
@@ -79,7 +79,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,
};
@@ -117,11 +116,6 @@ int main(int argc, char **argv)
return 1;
}
- if (setrlimit(RLIMIT_MEMLOCK, &r)) {
- perror("setrlimit(RLIMIT_MEMLOCK)");
- return 1;
- }
-
ifindex = if_nametoindex(argv[optind]);
if (!ifindex) {
perror("if_nametoindex");