net/mlx5: Use devlink port pointer to get the pointer of container SF struct
[ Upstream commit
9caeb1475c3e852bcfa6332227c6bb2feaa8eb23 ]
Benefit from the fact that struct devlink_port is eventually embedded
in struct mlx5_sf and use container_of() macro to get it instead of the
xarray lookup in every devlink port op.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Stable-dep-of:
26e42ec7712d ("net/mlx5: Nack sync reset when SFs are present")
Signed-off-by: Sasha Levin <sashal@kernel.org>