| From 783ad08e58d9c4d0bb93e91c73f94cb7bfe8a4cc Mon Sep 17 00:00:00 2001 |
| From: Saeed Mahameed <saeedm@mellanox.com> |
| Date: Thu, 21 Mar 2019 15:51:33 -0700 |
| Subject: net/mlx5e: Fix compilation warning in en_tc.c |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| [ Upstream commit ee576ec1c1c66ec1cd0c4735bb12bc08f675f530 ] |
| |
| Amazingly a mlx5e_tc function is being called from the eswitch layer, |
| which is by itself very terrible! The function was declared locally in |
| eswitch_offloads.c so it could be used there, which caused the following |
| compilation warning, fix that. |
| |
| drivers/.../mlx5/core/en_tc.c:3242:6: [-Werror=missing-prototypes] |
| error: no previous prototype for ‘mlx5e_tc_clean_fdb_peer_flows’ |
| |
| Fixes: 04de7dda7394 ("net/mlx5e: Infrastructure for duplicated offloading of TC flows") |
| Reviewed-by: Roi Dayan <roid@mellanox.com> |
| Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 3 +++ |
| drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 -- |
| 2 files changed, 3 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h |
| index 3f3cd32ae60a2..e0ba59b5296f0 100644 |
| --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h |
| +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h |
| @@ -431,6 +431,9 @@ static inline int mlx5_eswitch_index_to_vport_num(struct mlx5_eswitch *esw, |
| return index; |
| } |
| |
| +/* TODO: This mlx5e_tc function shouldn't be called by eswitch */ |
| +void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw); |
| + |
| #else /* CONFIG_MLX5_ESWITCH */ |
| /* eswitch API stubs */ |
| static inline int mlx5_eswitch_init(struct mlx5_core_dev *dev) { return 0; } |
| diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c |
| index d2d8da133082c..a97ffd0dbf014 100644 |
| --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c |
| +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c |
| @@ -1521,8 +1521,6 @@ static int mlx5_esw_offloads_pair(struct mlx5_eswitch *esw, |
| return 0; |
| } |
| |
| -void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw); |
| - |
| static void mlx5_esw_offloads_unpair(struct mlx5_eswitch *esw) |
| { |
| mlx5e_tc_clean_fdb_peer_flows(esw); |
| -- |
| 2.20.1 |
| |