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: <70b3a7b5-abd3-4db4-8415-e0467a565847@nvidia.com>
Date: Sun, 15 Dec 2024 15:39:11 +0200
From: Moshe Shemesh <moshe@...dia.com>
To: Simon Horman <horms@...nel.org>, Tariq Toukan <tariqt@...dia.com>, "Kees
 Cook" <kees@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, "Andrew
 Lunn" <andrew+netdev@...n.ch>, Leon Romanovsky <leonro@...dia.com>,
	<netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
	<gal@...dia.com>, <linux-rdma@...r.kernel.org>, Yevgeny Kliteynik
	<kliteyn@...dia.com>, Mark Bloch <mbloch@...dia.com>
Subject: Re: [PATCH net-next 05/12] net/mlx5: fs, add mlx5_fs_pool API



On 12/12/2024 7:23 PM, Simon Horman wrote:
> External email: Use caution opening links or attachments
> 
> 
> On Wed, Dec 11, 2024 at 03:42:16PM +0200, Tariq Toukan wrote:
>> From: Moshe Shemesh <moshe@...dia.com>
>>
>> Refactor fc_pool API to create generic fs_pool API, as HW steering has
>> more flow steering elements which can take advantage of the same pool of
>> bulks API. Change fs_counters code to use the fs_pool API.
>>
>> Signed-off-by: Moshe Shemesh <moshe@...dia.com>
>> Reviewed-by: Yevgeny Kliteynik <kliteyn@...dia.com>
>> Reviewed-by: Mark Bloch <mbloch@...dia.com>
>> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> 
> ...
> 
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
> 
> ...
> 
>> @@ -447,11 +437,9 @@ void mlx5_fc_update_sampling_interval(struct mlx5_core_dev *dev,
>>   /* Flow counter bluks */
>>
>>   struct mlx5_fc_bulk {
>> -     struct list_head pool_list;
>> +     struct mlx5_fs_bulk fs_bulk;
>>        u32 base_id;
>> -     int bulk_len;
>> -     unsigned long *bitmask;
>> -     struct mlx5_fc fcs[] __counted_by(bulk_len);
>> +     struct mlx5_fc fcs[] __counted_by(fs_bulk.bulk_len);
>>   };
> 
> Unfortunately it seems that clang-19 doesn't know how to handle
> __counted_by() when used like this:
> 
> drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c:442:36: error: 'counted_by' argument must be a simple declaration reference
>    442 |         struct mlx5_fc fcs[] __counted_by(fs_bulk.bulk_len);

Thanks Simon, from code perspective, bulk_len should be now in the inner 
struct fs_bulk.

Keen Cook, is that going to be supported in the future? for now I will 
just remove __counted_by() from this struct.

>        |                                           ^~~~~~~~~~~~~~~~
> ././include/linux/compiler_types.h:346:62: note: expanded from macro '__counted_by'
>    346 | # define __counted_by(member)           __attribute__((__counted_by__(member)))
>        |                                                                       ^~~~~~
> 
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ