net/mlx5: Expose SF firmware pages counter
authorMaher Sanalla <msanalla@nvidia.com>
Sun, 22 Jan 2023 21:24:56 +0000 (23:24 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 8 Feb 2023 03:01:06 +0000 (19:01 -0800)
commit9965bbebae59b3563a4d95e4aed121e8965dfdc2
tree7f37314b6b73b6e47b4322079bf89b507591e29f
parentc3bdbaea654d8df39112de33037106134a520dc7
net/mlx5: Expose SF firmware pages counter

Currently, each core device has VF pages counter which stores number of
fw pages used by its VFs and SFs.

The current design led to a hang when performing firmware reset on DPU,
where the DPU PFs stalled in sriov unload flow due to waiting on release
of SFs pages instead of waiting on only VFs pages.

Thus, Add a separate counter for SF firmware pages, which will prevent
the stall scenario described above.

Fixes: 1958fc2f0712 ("net/mlx5: SF, Add auxiliary device driver")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/debugfs.c
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
include/linux/mlx5/driver.h