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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+01bfkEKwBgu3Gy@x130>
Date:   Wed, 15 Feb 2023 11:41:33 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Alexander Lobakin <aleksander.lobakin@...el.com>
Cc:     Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
        Tariq Toukan <tariqt@...dia.com>, Roi Dayan <roid@...dia.com>,
        Maor Dickman <maord@...dia.com>
Subject: Re: [net-next 01/15] net/mlx5: Lag, Let user configure multiport
 eswitch

On 15 Feb 18:04, Alexander Lobakin wrote:
>From: Leon Romanovsky <leon@...nel.org>
>Date: Wed, 15 Feb 2023 13:46:29 +0200
>
>> On Tue, Feb 14, 2023 at 06:07:54PM +0100, Alexander Lobakin wrote:
>>> From: Saeed Mahameed <saeed@...nel.org>
>>> Date: Fri, 10 Feb 2023 14:18:07 -0800
>
>[...]
>
>>> How about
>>>
>>> 	if (ctx->val.vbool)
>>> 		return mlx5_lag_mpesw_enable(dev);
>>> 	else
>>> 		mlx5_lag_mpesw_disable(dev);
>>>
>>> 	return 0;
>>
>> If such construction is used, there won't need in "else".
>>
>>  	if (ctx->val.vbool)
>>  		return mlx5_lag_mpesw_enable(dev);
>>
>>  	mlx5_lag_mpesw_disable(dev);
>>  	return 0;
>

Thanks, this is exactly what I did when posting V2.

>Correct, I just thought that if-else would look more intuitive here
>since it's a simple "if enabled enable else disable".
>
>[...]
>
>Thanks,
>Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ