net/mlx5: Relax mlx5_devlink_eswitch_get() return value checking
authorJiri Pirko <jiri@nvidia.com>
Thu, 1 Jun 2023 11:59:52 +0000 (13:59 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 23 Aug 2023 04:34:17 +0000 (21:34 -0700)
commit5c632cc352e1ca7995e9ccea9a11f7f9a53b1717
tree3a158bb4ad406325fdae09482168fdec8d050518
parentc0ae0092927222a1399465325ff778a78cc5f826
net/mlx5: Relax mlx5_devlink_eswitch_get() return value checking

If called from port ops, it is not needed to perform the checks in
mlx5_devlink_eswitch_get(). The reason is devlink port would not be
registered if the checks are not true. Introduce relaxed version
mlx5_devlink_eswitch_nocheck_get() and use it in port 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/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c