lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aba5915c-5246-4a31-a2ea-2eeedb4ab108@fiberby.net>
Date: Sat, 13 Sep 2025 23:14:38 +0000
From: Asbjørn Sloth Tønnesen <ast@...erby.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Donald Hunter <donald.hunter@...il.com>,
 Simon Horman <horms@...nel.org>, Jacob Keller <jacob.e.keller@...el.com>,
 Sabrina Dubroca <sd@...asysnail.net>, wireguard@...ts.zx2c4.com,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3 06/13] tools: ynl-gen: deduplicate
 fixed_header handling

On 9/13/25 12:24 AM, Jakub Kicinski wrote:
> On Thu, 11 Sep 2025 20:04:59 +0000 Asbjørn Sloth Tønnesen wrote:
>> Fixed headers are handled nearly identical in print_dump(),
>> print_req() and put_req_nested(), generalize them and use a
>> common function to generate them.
>>
>> This only causes cosmetic changes to tc_netem_attrs_put() in
>> tc-user.c.
>>
>> Signed-off-by: Asbjørn Sloth Tønnesen <ast@...erby.net>
>> ---
>>   tools/net/ynl/pyynl/ynl_gen_c.py | 39 ++++++++++++++++----------------
>>   1 file changed, 20 insertions(+), 19 deletions(-)
> 
> This only makes the code longer and harder to follow.

We have 3 functions using put_attr():
* put_req_nested()
* print_req()
* print_dump()

I was just trying to align them a bit more so that they don't
do the same thing in three different ways. I would prefer to
make these functions more aligned, as it will hopefully make
it easier avoid issue like the missing local variables for
.attr_put().

I agree these clean up patches would also fit better in a
dedicated cleanup series, the only reason that I added this to
this series, was because you pushed back, then I said that the
`len` dedup, and other "make code look natural" cleanups might
not be for this series.

I have dropped this patch in v4, it's not important for this
series.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ