net/mlx5: Don't register ops for non-PF/VF/SF port and avoid checks in ops
authorJiri Pirko <jiri@nvidia.com>
Thu, 1 Jun 2023 07:09:12 +0000 (09:09 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Aug 2023 04:34:17 +0000 (21:34 -0700)
commit13f878a22c20d1c0e1d8ffa7aa97c33519b5bd7c
tree5c8d16653a551c58498a6716ee9c43cfc3361f5b
parentb940ec4b25beec39358f483d01a19144b88ee1aa
net/mlx5: Don't register ops for non-PF/VF/SF port and avoid checks in ops

Currently each PF/VF/SF devlink port op called into mlx5 code calls
is_port_function_supported() to check if the port is either
PF, VF or SF. So make sure that the ops are registered with devlink
port only for those and avoid the is_port_function_supported() checks
in ops.

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
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c