From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, bpf@vger.kernel.org, brouer@redhat.com
Subject: Re: [PATCH bpf-next v3 4/4] selftests: Add tests for automatic map pinning
Date: Mon, 28 Oct 2019 14:15:56 +0100 [thread overview]
Message-ID: <87imo9roxf.fsf@toke.dk> (raw)
In-Reply-To: <20191028140624.584bcc1e@carbon>
Jesper Dangaard Brouer <brouer@redhat.com> writes:
> On Sun, 27 Oct 2019 21:53:19 +0100
> Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
>> diff --git a/tools/testing/selftests/bpf/progs/test_pinning.c b/tools/testing/selftests/bpf/progs/test_pinning.c
>> new file mode 100644
>> index 000000000000..ff2d7447777e
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/progs/test_pinning.c
>> @@ -0,0 +1,29 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +#include <linux/bpf.h>
>> +#include "bpf_helpers.h"
>> +
>> +int _version SEC("version") = 1;
>> +
>> +struct {
>> + __uint(type, BPF_MAP_TYPE_ARRAY);
>> + __uint(max_entries, 1);
>> + __type(key, __u32);
>> + __type(value, __u64);
>> + __uint(pinning, LIBBPF_PIN_BY_NAME);
>> +} pinmap SEC(".maps");
>
> So, this is the new BTF-defined maps syntax.
>
> Please remind me, what version of LLVM do we need to compile this?
No idea what the minimum version is. I'm running LLVM 9.0 :)
> Or was there a dependency on pahole?
Don't think so...
-Toke
next prev parent reply other threads:[~2019-10-28 13:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 20:53 [PATCH bpf-next v3 0/4] libbpf: Support automatic pinning of maps using 'pinning' BTF attribute Toke Høiland-Jørgensen
2019-10-27 20:53 ` [PATCH bpf-next v3 1/4] libbpf: Fix error handling in bpf_map__reuse_fd() Toke Høiland-Jørgensen
2019-10-27 20:53 ` [PATCH bpf-next v3 2/4] libbpf: Store map pin path and status in struct bpf_map Toke Høiland-Jørgensen
2019-10-28 18:24 ` Andrii Nakryiko
2019-10-29 9:01 ` Toke Høiland-Jørgensen
2019-10-29 18:02 ` Andrii Nakryiko
2019-10-29 18:36 ` Toke Høiland-Jørgensen
2019-10-27 20:53 ` [PATCH bpf-next v3 3/4] libbpf: Add auto-pinning of maps when loading BPF objects Toke Høiland-Jørgensen
2019-10-28 18:24 ` Andrii Nakryiko
2019-10-29 9:30 ` Toke Høiland-Jørgensen
2019-10-29 18:13 ` Andrii Nakryiko
2019-10-29 18:44 ` Toke Høiland-Jørgensen
2019-10-29 18:56 ` Andrii Nakryiko
2019-10-29 19:07 ` Toke Høiland-Jørgensen
2019-10-27 20:53 ` [PATCH bpf-next v3 4/4] selftests: Add tests for automatic map pinning Toke Høiland-Jørgensen
2019-10-28 13:06 ` Jesper Dangaard Brouer
2019-10-28 13:15 ` Toke Høiland-Jørgensen [this message]
2019-10-28 15:32 ` Yonghong Song
2019-10-28 16:13 ` Jesper Dangaard Brouer
2019-10-28 17:32 ` Alexei Starovoitov
2019-10-28 18:23 ` Andrii Nakryiko
2019-10-28 18:43 ` Andrii Nakryiko
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=87imo9roxf.fsf@toke.dk \
--to=toke@redhat.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).