1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
3 * Copyright (c) 2018 Mellanox Technologies. All rights reserved.
9 #include <linux/mlx5/driver.h>
23 struct mlx5_eswitch_rep;
24 struct mlx5_eswitch_rep_if {
25 int (*load)(struct mlx5_core_dev *dev,
26 struct mlx5_eswitch_rep *rep);
27 void (*unload)(struct mlx5_eswitch_rep *rep);
28 void *(*get_proto_dev)(struct mlx5_eswitch_rep *rep);
33 struct mlx5_eswitch_rep {
34 struct mlx5_eswitch_rep_if rep_if[NUM_REP_TYPES];
41 void mlx5_eswitch_register_vport_rep(struct mlx5_eswitch *esw,
43 struct mlx5_eswitch_rep_if *rep_if,
45 void mlx5_eswitch_unregister_vport_rep(struct mlx5_eswitch *esw,
48 void *mlx5_eswitch_get_proto_dev(struct mlx5_eswitch *esw,
51 struct mlx5_eswitch_rep *mlx5_eswitch_vport_rep(struct mlx5_eswitch *esw,
53 void *mlx5_eswitch_uplink_get_proto_dev(struct mlx5_eswitch *esw, u8 rep_type);
54 u8 mlx5_eswitch_mode(struct mlx5_eswitch *esw);
55 struct mlx5_flow_handle *
56 mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw,