BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Yonghong Song <yonghong.song@linux.dev>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Kernel Team <kernel-team@fb.com>,
	"Jose E. Marchesi" <jose.marchesi@oracle.com>
Subject: Re: [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers
Date: Fri, 08 Dec 2023 22:35:12 +0200	[thread overview]
Message-ID: <7cd973c016a422f9a27f58f85799dcdf4bcfe71c.camel@gmail.com> (raw)
In-Reply-To: <CAADnVQK-RP-rOq2cGOSRt614td536Kp+9c=moNH_pen0EY2FUA@mail.gmail.com>

On Fri, 2023-12-08 at 09:46 -0800, Alexei Starovoitov wrote:
[...]
> > I just want to propose to have less work :-) since we are only dealing
> > with a few structs in bpf domain. Note that eventually generated
> > vmlinux.h will be the same whether we use 'hard code' approach or the
> > decl_tag approach. The difference is just how to do it: - dwarf/btf with
> > decl tag -> bpftool vmlinux.h gen, or - dwarf/btf without decl tag +
> > hardcoded bpf ctx info -> bpftool vmlinux.h gen If we intends to cover
> > all uapi data structures (to prevent unnecessary CORE relocation, esp.
> > for troublesome bitfield operations), hardcoded approach won't work and
> > we may have to go to decl tag approach.
> 
> +1 for simplicity of "hard code" approach.
> We've stopped adding new uapi "mirror" structs like __sk_buff long ago.
> The number of structs that need ctx rewrite will not increase.

Ok, I'll submit V2 with changes in libbpf/bpftool to emit
preserve_static_offset for predefined set of types.

  reply	other threads:[~2023-12-08 20:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08  0:05 [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers Eduard Zingerman
2023-12-08  0:05 ` [PATCH bpf-next 1/1] bpf: Mark virtual BPF context structures as preserve_static_offset Eduard Zingerman
2023-12-08  3:36   ` Yonghong Song
2023-12-08 14:23     ` Eduard Zingerman
2023-12-08  2:28 ` [PATCH bpf-next 0/1] use preserve_static_offset in bpf uapi headers Yonghong Song
2023-12-08 14:34   ` Eduard Zingerman
2023-12-08 17:19     ` Yonghong Song
2023-12-08 20:54       ` Eduard Zingerman
2023-12-08 17:30     ` Yonghong Song
2023-12-08 17:46       ` Alexei Starovoitov
2023-12-08 20:35         ` Eduard Zingerman [this message]
2023-12-08 12:27 ` Alan Maguire
2023-12-08 14:21   ` Eduard Zingerman
2023-12-08 15:35     ` Alan Maguire
2023-12-08 15:39       ` Eduard Zingerman

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=7cd973c016a422f9a27f58f85799dcdf4bcfe71c.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jose.marchesi@oracle.com \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=yonghong.song@linux.dev \
    /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