From e855afd715656a9f25cf62fa68d99c33213b83b7 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Fri, 26 May 2023 15:01:47 +0200 Subject: net/mlx5: Introduce mlx5_eswitch_load/unload_sf_vport() and use it from SF code Similar to the PF/VF helpers, introduce a set of load/unload helpers for SF vports. From there, call mlx5_eswitch_load/unload_vport() which are common for PFs/VFs and newly introduced SF helpers. Signed-off-by: Jiri Pirko Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c') diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 055faaf5dbb7..998e56cf43db 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -2551,6 +2551,18 @@ void mlx5_esw_offloads_cleanup_pf_vf_rep(struct mlx5_eswitch *esw, u16 vport_num mlx5_esw_offloads_pf_vf_devlink_port_cleanup(esw, vport_num); } +int mlx5_esw_offloads_init_sf_rep(struct mlx5_eswitch *esw, u16 vport_num, + struct devlink_port *dl_port, + u32 controller, u32 sfnum) +{ + return mlx5_esw_offloads_sf_devlink_port_init(esw, vport_num, dl_port, controller, sfnum); +} + +void mlx5_esw_offloads_cleanup_sf_rep(struct mlx5_eswitch *esw, u16 vport_num) +{ + mlx5_esw_offloads_sf_devlink_port_cleanup(esw, vport_num); +} + int mlx5_esw_offloads_load_rep(struct mlx5_eswitch *esw, u16 vport_num) { int err; -- cgit v1.2.3