bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	martin.lau@kernel.org, kernel-team@meta.com
Subject: Re: [PATCH RFC bpf-next 1/3] bpf: revamp bpf_attr and name each command's field and substruct
Date: Wed, 24 May 2023 20:18:10 -0700	[thread overview]
Message-ID: <20230525031810.g42tmdk7ykjrkrcr@MacBook-Pro-8.local> (raw)
In-Reply-To: <20230524210243.605832-2-andrii@kernel.org>

On Wed, May 24, 2023 at 02:02:41PM -0700, Andrii Nakryiko wrote:
> 
> And there were a bunch of other similar changes. Please take a thorough
> look and suggest more changes or which changes to drop. I'm not married
> to any of them, it just felt like a good improvement.

Agree that current layout sucks, but ...

>  include/uapi/linux/bpf.h       | 235 +++++++++++++++++++++++++++------
>  kernel/bpf/syscall.c           |  40 +++---
>  tools/include/uapi/linux/bpf.h | 235 +++++++++++++++++++++++++++------
>  3 files changed, 405 insertions(+), 105 deletions(-)

... the diff makes it worse. The diffstat for "nop" change is a red flag.

> +	/*
> +	 * LEGACY anonymous substructs, for backwards compatibility.
> +	 * Each of the below anonymous substructs are ABI compatible with one
> +	 * of the above named substructs. Please use named substructs.
> +	 */
> +

All of them cannot be removed. This bagage will be a forever eyesore.
Currently it's not pretty. The diffs make uapi file just ugly.
Especially considering how 'named' and 'legacy' will start diverging.
New commands are thankfully named. We've learned the lesson,
but prior mistake is unfixable. We have to live with it.

  reply	other threads:[~2023-05-25  3:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 21:02 [PATCH RFC bpf-next 0/3] Revamp bpf_attr and make it easier to evolve Andrii Nakryiko
2023-05-24 21:02 ` [PATCH RFC bpf-next 1/3] bpf: revamp bpf_attr and name each command's field and substruct Andrii Nakryiko
2023-05-25  3:18   ` Alexei Starovoitov [this message]
2023-05-25 17:19     ` Andrii Nakryiko
2023-05-25 21:51       ` Daniel Borkmann
2023-05-25 23:39         ` Andrii Nakryiko
2023-05-30 17:41           ` Alexei Starovoitov
2023-05-30 18:26             ` Andrii Nakryiko
2023-05-24 21:02 ` [PATCH RFC bpf-next 2/3] bpf: use new named bpf_attr substructs for few commands Andrii Nakryiko
2023-05-24 21:02 ` [PATCH RFC bpf-next 3/3] libbpf: use new bpf_xxx_attr structs for bpf() commands 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=20230525031810.g42tmdk7ykjrkrcr@MacBook-Pro-8.local \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@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).