]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: fs, manage flow counters HWS action sharing by refcount
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 9 Jan 2025 16:05:38 +0000 (18:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 Jan 2025 03:21:08 +0000 (19:21 -0800)
commitb581f4266928d3b5d1bbe711e39623d9a1696091
tree373a276df9c47b654f368f8b0e84642164074cbc
parentb36315ca69cb39c839c98a31cae27b266481b0ac
net/mlx5: fs, manage flow counters HWS action sharing by refcount

Multiple flow counters can utilize a single Hardware Steering (HWS)
action for Hardware Steering rules. Given that these counter bulks are
not exclusively created for Hardware Steering, but also serve purposes
such as statistics gathering and other steering modes, it's more
efficient to create the HWS action only when it's first needed by a
Hardware Steering rule. This approach allows for better resource
management through the use of a reference count, rather than
automatically creating an HWS action for every bulk of flow counters.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20250109160546.1733647-8-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws_pools.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws_pools.h