net/mlx5: Use devlink port pointer to get the pointer of container SF struct
authorJiri Pirko <jiri@nvidia.com>
Wed, 17 May 2023 11:59:34 +0000 (13:59 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 20 Sep 2023 06:33:06 +0000 (23:33 -0700)
commit9caeb1475c3e852bcfa6332227c6bb2feaa8eb23
treefbda55371574bee0b3c108e62b41f5d33112bdac
parent2597ee190b4eb48d3b7d35b7bb2cc18046ae087e
net/mlx5: Use devlink port pointer to get the pointer of container SF struct

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>
drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c