diff options
author | Jiri Pirko <jiri@nvidia.com> | 2023-06-01 10:09:12 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-08-23 07:34:17 +0300 |
commit | 13f878a22c20d1c0e1d8ffa7aa97c33519b5bd7c (patch) | |
tree | 5c8d16653a551c58498a6716ee9c43cfc3361f5b /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | |
parent | b940ec4b25beec39358f483d01a19144b88ee1aa (diff) | |
download | linux-13f878a22c20d1c0e1d8ffa7aa97c33519b5bd7c.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index e1e808105e98..ad2ebd843ed2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -680,6 +680,7 @@ struct mlx5_vport *__must_check mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num); bool mlx5_eswitch_is_vf_vport(struct mlx5_eswitch *esw, u16 vport_num); +bool mlx5_eswitch_is_pf_vf_vport(struct mlx5_eswitch *esw, u16 vport_num); bool mlx5_esw_is_sf_vport(struct mlx5_eswitch *esw, u16 vport_num); int mlx5_esw_funcs_changed_handler(struct notifier_block *nb, unsigned long type, void *data); |