]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx5: HWS, Track matcher sizes individually
authorVlad Dogaru <vdogaru@nvidia.com>
Thu, 3 Jul 2025 18:54:28 +0000 (21:54 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Jul 2025 02:12:16 +0000 (19:12 -0700)
commit6b44fffdc7b792e1d32b104c76504c3722e9704f
treefea07651f623a15e67392f0622521d3e2a8b8c81
parentc8332ce096913bc6624cdbd5276fa49dc92fa532
net/mlx5: HWS, Track matcher sizes individually

Track and grow matcher sizes individually for RX and TX RTCs. This
allows RX-only or TX-only use cases to effectively halve the device
resources they use.

For testing we used a simple module that inserts 1M RX-only rules and
measured the number of pages the device requests, and memory usage as
reported by `free -h`.

Pages Memory
Before this patch: 300k 1.5GiB
After this patch: 160k 900MiB

Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250703185431.445571-8-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.h