From: Daniel Borkmann <daniel@iogearbox.net>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
john fastabend <john.fastabend@gmail.com>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH rfc bpf-next 5/8] bpf: add jit poke descriptor mock-up for jit images
Date: Mon, 18 Nov 2019 19:43:36 +0100 [thread overview]
Message-ID: <10321d85-b9e5-e786-53eb-b4ff6d981e2c@iogearbox.net> (raw)
In-Reply-To: <CAEf4BzZjUvsf6wGuh2JyEBKLOsJD7ihQMwF69CbM3DsR0tN0bg@mail.gmail.com>
On 11/18/19 7:17 PM, Andrii Nakryiko wrote:
> On Thu, Nov 14, 2019 at 5:05 PM Daniel Borkmann <daniel@iogearbox.net> wrote:
>>
>> Add initial poke table data structures and management to the BPF
>> prog that can later be used by JITs. Also add an instance of poke
>> specific data for tail call maps. Plan for later work is to extend
>> this also for BPF static keys.
>>
>> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
>> ---
>
> looks good, just one more minor naming nit
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
>
>> include/linux/bpf.h | 20 ++++++++++++++++++++
>> include/linux/filter.h | 10 ++++++++++
>> kernel/bpf/core.c | 34 ++++++++++++++++++++++++++++++++++
>> 3 files changed, 64 insertions(+)
>>
>> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
>> index 40337fa0e463..0ff06a0d0058 100644
>> --- a/include/linux/bpf.h
>> +++ b/include/linux/bpf.h
>> @@ -484,6 +484,24 @@ struct bpf_func_info_aux {
>> bool unreliable;
>> };
>>
>> +enum bpf_jit_poke_reason {
>> + BPF_POKE_REASON_TAIL_CALL,
>> +};
>> +
>> +/* Descriptor of pokes pointing /into/ the JITed image. */
>> +struct bpf_jit_poke_descriptor {
>> + void *ip;
>> + union {
>> + struct {
>> + struct bpf_map *map;
>> + u32 key;
>> + } tc;
>
> tc is a bit overloaded abbreviation, tail_call would be super-clear, though ;)
Ok, sure, will include it into the non-rfc version.
>> + };
>> + u8 ip_stable;
>> + u8 adj_off;
>> + u16 reason;
>> +};
>> +
>
> [...]
>
next prev parent reply other threads:[~2019-11-18 18:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 1:03 [PATCH rfc bpf-next 0/8] Optimize BPF tail calls for direct jumps Daniel Borkmann
2019-11-15 1:03 ` [PATCH rfc bpf-next 1/8] bpf, x86: generalize and extend bpf_arch_text_poke " Daniel Borkmann
2019-11-15 23:22 ` Andrii Nakryiko
2019-11-15 23:42 ` Daniel Borkmann
2019-11-16 0:01 ` Andrii Nakryiko
2019-11-15 1:03 ` [PATCH rfc bpf-next 2/8] bpf: add bpf_prog_under_eviction helper Daniel Borkmann
2019-11-15 1:03 ` [PATCH rfc bpf-next 3/8] bpf: move bpf_free_used_maps into sleepable section Daniel Borkmann
2019-11-15 23:32 ` Andrii Nakryiko
2019-11-15 1:03 ` [PATCH rfc bpf-next 4/8] bpf: move owner type,jited info into array auxillary data Daniel Borkmann
2019-11-15 23:19 ` Andrii Nakryiko
2019-11-15 1:03 ` [PATCH rfc bpf-next 5/8] bpf: add jit poke descriptor mock-up for jit images Daniel Borkmann
2019-11-18 18:17 ` Andrii Nakryiko
2019-11-18 18:43 ` Daniel Borkmann [this message]
2019-11-15 1:04 ` [PATCH rfc bpf-next 6/8] bpf: add poke dependency tracking for prog array maps Daniel Borkmann
2019-11-18 17:39 ` Andrii Nakryiko
2019-11-18 18:39 ` Daniel Borkmann
2019-11-18 18:46 ` Andrii Nakryiko
2019-11-18 21:35 ` Daniel Borkmann
2019-11-15 1:04 ` [PATCH rfc bpf-next 7/8] bpf, x86: emit patchable direct jump as tail call Daniel Borkmann
2019-11-15 3:23 ` Alexei Starovoitov
2019-11-15 7:27 ` Daniel Borkmann
2019-11-15 1:04 ` [PATCH rfc bpf-next 8/8] bpf: constant map key tracking for prog array pokes Daniel Borkmann
2019-11-15 4:29 ` Alexei Starovoitov
2019-11-15 7:13 ` Daniel Borkmann
2019-11-15 16:33 ` Alexei Starovoitov
2019-11-15 16:49 ` Daniel Borkmann
2019-11-18 18:11 ` Andrii Nakryiko
2019-11-18 21:45 ` Daniel Borkmann
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=10321d85-b9e5-e786-53eb-b4ff6d981e2c@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=john.fastabend@gmail.com \
--cc=netdev@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 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).