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: <ZBIv4oGgtWbTGkaS@x130>
Date:   Wed, 15 Mar 2023 13:51:46 -0700
From:   Saeed Mahameed <saeed@...nel.org>
To:     Piotr Raczynski <piotr.raczynski@...el.com>
Cc:     "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>,
        Parav Pandit <parav@...dia.com>,
        Daniel Jurgens <danielj@...dia.com>
Subject: Re: [net 03/14] net/mlx5: Fix setting ec_function bit in MANAGE_PAGES

On 15 Mar 14:10, Piotr Raczynski wrote:
>On Tue, Mar 14, 2023 at 10:49:29AM -0700, Saeed Mahameed wrote:
>> From: Parav Pandit <parav@...dia.com>
>>
>> When ECPF is a page supplier, reclaim pages missed to honor the
>> ec_function bit provided by the firmware. It always used the ec_function
>> to true during driver unload flow for ECPF. This is incorrect.
>>
>> Honor the ec_function bit provided by device during page allocation
>> request event.
>>
>> Fixes: d6945242f45d ("net/mlx5: Hold pages RB tree per VF")
>> Signed-off-by: Parav Pandit <parav@...dia.com>
>> Signed-off-by: Daniel Jurgens <danielj@...dia.com>
>> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
>> ---
>>  .../ethernet/mellanox/mlx5/core/pagealloc.c    | 18 ++++++++++++++----
>>  1 file changed, 14 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
>> index 64d4e7125e9b..bd2712b2317d 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
>> @@ -82,6 +82,16 @@ static u16 func_id_to_type(struct mlx5_core_dev *dev, u16 func_id, bool ec_funct
>>  	return func_id <= mlx5_core_max_vfs(dev) ?  MLX5_VF : MLX5_SF;
>>  }
>>
>> +static u32 get_ec_function(u32 function)
>> +{
>> +	return function >> 16;
>> +}
>> +
>> +static u32 get_func_id(u32 function)
>> +{
>> +	return function & 0xffff;
>> +}
>> +
>Some code in this file is mlx5 'namespaced', some is not. It may be a
>little easier to follow the code knowing explicitly whether it is driver
>vs core code, just something to consider.
>

For static local file functions we prefer to avoid mlx5 perfix.

>Other than that, looks fine, thanks.
>Reviewed-by: Piotr Raczynski <piotr.raczynski@...el.com>
>

Thanks!


>>  static struct rb_root *page_root_per_function(struct mlx5_core_dev *dev, u32 >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ