From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Radu Stoenescu <radu.stoe@gmail.com>, xdp-newbies@vger.kernel.org
Subject: Re: Unable to run eBPF program that uses maps
Date: Mon, 07 Oct 2019 10:36:28 +0200 [thread overview]
Message-ID: <87k19hlzoz.fsf@toke.dk> (raw)
In-Reply-To: <CAM-scZMSvAE0jny0b__Da1j=krBB38J8w_H_12s=sy7T=F0spQ@mail.gmail.com>
Radu Stoenescu <radu.stoe@gmail.com> writes:
> I'm running this Ubuntu: Linux anemie 5.0.0-31-generic #33~18.04.1-Ubuntu SMP
>
> I've cloned and compiled the Linux kernel - the same version and
> config as of my machine's.
>
> When trying to run the xdp_redirec_map sample program from samples/bpf I get:
>
> sudo ./xdp_redirect_map 2 1
> #=> failed to create map 0 (tx_port): 1 Operation not permitted
>
> I read that, on certain systems, the default limit of locked memory
> might pose problems, and I mitigated that as seen below:
>
> ulimit -a
>
> core file size (blocks, -c) 0
> data seg size (kbytes, -d) unlimited
> scheduling priority (-e) 0
> file size (blocks, -f) unlimited
> pending signals (-i) 31231
> max locked memory (kbytes, -l) 1024
Is this run as your regular user? The limit will be reset in the sudo
environment that loads the program; so you'll need to set it as root (so
something like `sudo -i; ulimit -l 1024; ./xdp_redirect_map 2 1`)
-Toke
prev parent reply other threads:[~2019-10-07 8:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 8:15 Unable to run eBPF program that uses maps Radu Stoenescu
2019-10-07 8:36 ` Toke Høiland-Jørgensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k19hlzoz.fsf@toke.dk \
--to=toke@redhat.com \
--cc=radu.stoe@gmail.com \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.