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] [thread-next>] [day] [month] [year] [list]
Message-ID: <403db5b1-1464-4dbc-ae88-9b60cf139e27@nvidia.com>
Date: Wed, 25 Jun 2025 17:42:09 +0300
From: Yevgeny Kliteynik <kliteyn@...dia.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Mark Bloch <mbloch@...dia.com>,
 "David S. Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
 Eric Dumazet <edumazet@...gle.com>, Andrew Lunn <andrew+netdev@...n.ch>,
 saeedm@...dia.com, gal@...dia.com, leonro@...dia.com, tariqt@...dia.com,
 Leon Romanovsky <leon@...nel.org>, netdev@...r.kernel.org,
 linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org, moshe@...dia.com,
 Vlad Dogaru <vdogaru@...dia.com>
Subject: Re: [PATCH net-next v2 3/8] net/mlx5: HWS, Refactor and export rule
 skip logic

On 25-Jun-25 03:45, Jakub Kicinski wrote:
> On Wed, 25 Jun 2025 03:35:52 +0300 Yevgeny Kliteynik wrote:
>>>> The bwc layer will use `mlx5hws_rule_skip` to keep track of numbers of
>>>> RX and TX rules individually, so export this function for future usage.
>>>>
>>>> While we're in there, reduce nesting by adding a couple of early return
>>>> statements.
>>>
>>> I'm all for reducing nesting. But this patch has two distinct changes.
>>> Please consider splitting it into two patches.
>>
>> Not sure I'd send the refactor thing alone - it isn't worth the effort
>> IMHO... But since I'm already in here - sure, will sent it in a separate
>> patch.
> 
> FWIW having a function which returns void but with 2 output parameters
> is in itself a bit awkward. I'd personally return a 2 bit bitmask of
> which mode is enabled. But there's no accounting for taste.

Indeed, it's a matter of taste.
I see that it's kind of a style in this area of the code ¯\_(ツ)_/¯
There are more somewhat similar cases, and I'd like to be aligned
with the existing style.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ