]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: HWS, Make pool single resource
authorVlad Dogaru <vdogaru@nvidia.com>
Thu, 10 Apr 2025 19:17:33 +0000 (22:17 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Apr 2025 00:29:15 +0000 (17:29 -0700)
commit38956bea7349ce75c1519b57c27cd97580b4c822
treeacb3f804d17d4358861fabfe72f2e21156f08b40
parentb2ae16214ffeda3e1c25223eebe19f85b0876181
net/mlx5: HWS, Make pool single resource

The pool implementation claimed to support multiple resources, but this
does not really make sense in context. Callers always allocate a single
STC or STE chunk of exactly the size provided.

The code that handled multiple resources was unused (and likely buggy)
due to the combination of flags passed by callers.

Simplify the pool by having it handle a single resource. As a result of
this simplification, chunks no longer contain a resource offset (there
is now only one resource per pool), and the get_base_id functions no
longer take a chunk parameter.

Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://patch.msgid.link/1744312662-356571-4-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/debug.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.h