@@ -340,11 +340,25 @@ struct mlx5_esw_flow_attr {
struct mlx5e_tc_flow_parse_attr *parse_attr;
};
+#ifdef CONFIG_MLX5_EN_ESWITCH_OFFLOADS
int mlx5_eswitch_sqs2vport_start(struct mlx5_eswitch *esw,
struct mlx5_eswitch_rep *rep,
u16 *sqns_array, int sqns_num);
void mlx5_eswitch_sqs2vport_stop(struct mlx5_eswitch *esw,
struct mlx5_eswitch_rep *rep);
+#else
+static inline int mlx5_eswitch_sqs2vport_start(struct mlx5_eswitch *esw,
+ struct mlx5_eswitch_rep *rep,
+ u16 *sqns_array, int sqns_num)
+{
+ return -EOPNOTSUPP;
+}
+static inline void mlx5_eswitch_sqs2vport_stop(struct mlx5_eswitch *esw,
+ struct mlx5_eswitch_rep *rep)
+{
+ return;
+}
+#endif
int mlx5_devlink_eswitch_mode_set(struct devlink *devlink, u16 mode);
int mlx5_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode);
@@ -302,7 +302,6 @@ int mlx5_eswitch_del_vlan_action(struct mlx5_eswitch *esw,
out:
return err;
}
-#endif
static struct mlx5_flow_handle *
mlx5_eswitch_add_send_to_vport_rule(struct mlx5_eswitch *esw, int vport, u32 sqn)
@@ -395,7 +394,6 @@ int mlx5_eswitch_sqs2vport_start(struct mlx5_eswitch *esw,
return err;
}
-#ifdef CONFIG_MLX5_EN_ESWITCH_OFFLOADS
static int esw_add_fdb_miss_rule(struct mlx5_eswitch *esw)
{
struct mlx5_flow_act flow_act = {0};
These aren't called if CONFIG_MLX5_EN_ESWITCH_OFFLOADS isn't enabled, so do not build them. Signed-off-by: Jes Sorensen <jsorensen@fb.com> --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 14 ++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-)