1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2020 Mellanox Technologies. */
3 
4 #ifndef __MLX5_EN_REP_NEIGH__
5 #define __MLX5_EN_REP_NEIGH__
6 
7 #include "en.h"
8 #include "en_rep.h"
9 
10 #if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
11 
12 int mlx5e_rep_neigh_init(struct mlx5e_rep_priv *rpriv);
13 void mlx5e_rep_neigh_cleanup(struct mlx5e_rep_priv *rpriv);
14 
15 struct mlx5e_neigh_hash_entry *
16 mlx5e_rep_neigh_entry_lookup(struct mlx5e_priv *priv,
17 			     struct mlx5e_neigh *m_neigh);
18 int mlx5e_rep_neigh_entry_create(struct mlx5e_priv *priv,
19 				 struct mlx5e_neigh *m_neigh,
20 				 struct net_device *neigh_dev,
21 				 struct mlx5e_neigh_hash_entry **nhe);
22 void mlx5e_rep_neigh_entry_release(struct mlx5e_neigh_hash_entry *nhe);
23 
24 void mlx5e_rep_queue_neigh_stats_work(struct mlx5e_priv *priv);
25 
26 #else /* CONFIG_MLX5_CLS_ACT */
27 
28 static inline int
mlx5e_rep_neigh_init(struct mlx5e_rep_priv * rpriv)29 mlx5e_rep_neigh_init(struct mlx5e_rep_priv *rpriv) { return 0; }
30 static inline void
mlx5e_rep_neigh_cleanup(struct mlx5e_rep_priv * rpriv)31 mlx5e_rep_neigh_cleanup(struct mlx5e_rep_priv *rpriv) {}
32 
33 #endif /* CONFIG_MLX5_CLS_ACT */
34 
35 #endif /* __MLX5_EN_REP_NEIGH__ */
36