diff options
author | Roi Dayan <roid@nvidia.com> | 2023-05-04 12:14:00 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-07-27 21:37:28 +0300 |
commit | 88d162b479815f5d6b6a4ff5fdb07aec9dc6280c (patch) | |
tree | c6caaa69dac21e47c529a42c6e6cf4c061148ff0 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | |
parent | 02ceda65f014e357d4142e9c004f40b3b3d61857 (diff) | |
download | linux-88d162b479815f5d6b6a4ff5fdb07aec9dc6280c.tar.xz |
net/mlx5: Devcom, Infrastructure changes
Update devcom infrastructure to be more generic, without
depending on max supported ports definition or a device guid,
and also more encapsulated so callers don't need to pass
the register devcom component id per event call.
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Roi Dayan <roid@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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h index ae0dc8a3060d..6d9378b0bce5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h @@ -354,6 +354,7 @@ struct mlx5_eswitch { } params; struct blocking_notifier_head n_head; struct xarray paired; + struct mlx5_devcom_comp_dev *devcom; }; void esw_offloads_disable(struct mlx5_eswitch *esw); @@ -383,6 +384,7 @@ void mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw); void mlx5_eswitch_disable(struct mlx5_eswitch *esw); void mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw); void mlx5_esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw); +bool mlx5_esw_offloads_devcom_is_ready(struct mlx5_eswitch *esw); int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw, u16 vport, const u8 *mac); int mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, @@ -818,6 +820,7 @@ static inline void mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw, bool cle static inline void mlx5_eswitch_disable(struct mlx5_eswitch *esw) {} static inline void mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw) {} static inline void mlx5_esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw) {} +static inline bool mlx5_esw_offloads_devcom_is_ready(struct mlx5_eswitch *esw) { return false; } static inline bool mlx5_eswitch_is_funcs_handler(struct mlx5_core_dev *dev) { return false; } static inline int mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw, u16 vport, int link_state) { return 0; } |