[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZjUvsf6wGuh2JyEBKLOsJD7ihQMwF69CbM3DsR0tN0bg@mail.gmail.com>
Date: Mon, 18 Nov 2019 10:17:37 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...nel.org>,
john fastabend <john.fastabend@...il.com>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH rfc bpf-next 5/8] bpf: add jit poke descriptor mock-up for
jit images
On Thu, Nov 14, 2019 at 5:05 PM Daniel Borkmann <daniel@...earbox.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@...earbox.net>
> ---
looks good, just one more minor naming nit
Acked-by: Andrii Nakryiko <andriin@...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 ;)
> + };
> + u8 ip_stable;
> + u8 adj_off;
> + u16 reason;
> +};
> +
[...]
Powered by blists - more mailing lists