Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5e: Fix compilation warning in en_tc.c

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>

+3 -2
+3
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
··· 431 431 return index; 432 432 } 433 433 434 + /* TODO: This mlx5e_tc function shouldn't be called by eswitch */ 435 + void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw); 436 + 434 437 #else /* CONFIG_MLX5_ESWITCH */ 435 438 /* eswitch API stubs */ 436 439 static inline int mlx5_eswitch_init(struct mlx5_core_dev *dev) { return 0; }
-2
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
··· 1523 1523 return 0; 1524 1524 } 1525 1525 1526 - void mlx5e_tc_clean_fdb_peer_flows(struct mlx5_eswitch *esw); 1527 - 1528 1526 static void mlx5_esw_offloads_unpair(struct mlx5_eswitch *esw) 1529 1527 { 1530 1528 mlx5e_tc_clean_fdb_peer_flows(esw);