net/mlx5: Store page counters in a single array

[ Upstream commit c3bdbaea65 ]

Currently, an independent page counter is used for tracking memory usage
for each function type such as VF, PF and host PF (DPU).

For better code-readibilty, use a single array that stores
the number of allocated memory pages for each function type.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Stable-dep-of: 9965bbebae ("net/mlx5: Expose SF firmware pages counter")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Maher Sanalla 2023-01-22 21:09:40 +02:00 • committed by Greg Kroah-Hartman
commit bbdfebb08f
5 changed files with 34 additions and 23 deletions