Re: [PATCH RFC bpf-next 1/3] bpf: revamp bpf_attr and name each command's field and substruct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux