net/mlx5: Rework devlink port alloc/free into init/cleanup
authorJiri Pirko <jiri@nvidia.com>
Wed, 24 May 2023 15:46:47 +0000 (17:46 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Aug 2023 04:34:15 +0000 (21:34 -0700)
commit4c0dac1ef8abc6295a91197884f5ceb5d11c2bd9
tree266995db6f4a985760f8e26edda821d24c495602
parent6176b8c4a19e150c4176b1ed93174e2f5965c4b5
net/mlx5: Rework devlink port alloc/free into init/cleanup

In order to prepare the devlink port registration function to be common
for PFs/VFs and SFs, change the existing devlink port allocation and
free functions into PF/VF init and cleanup, so similar helpers could be
later on introduced for SFs. Make the init/cleanup helpers responsible
for setting/clearing the vport->dl_port pointer.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/devlink_port.c