0001
0002
0003
0004 #ifndef __MLX5_LAG_MPESW_H__
0005 #define __MLX5_LAG_MPESW_H__
0006
0007 #include "lag.h"
0008 #include "mlx5_core.h"
0009
0010 struct lag_mpesw {
0011 struct work_struct mpesw_work;
0012 atomic_t mpesw_rule_count;
0013 };
0014
0015 void mlx5_mpesw_work(struct work_struct *work);
0016 int mlx5_lag_do_mirred(struct mlx5_core_dev *mdev, struct net_device *out_dev);
0017 bool mlx5_lag_mpesw_is_activated(struct mlx5_core_dev *dev);
0018 #if IS_ENABLED(CONFIG_MLX5_ESWITCH)
0019 void mlx5_lag_mpesw_init(struct mlx5_lag *ldev);
0020 void mlx5_lag_mpesw_cleanup(struct mlx5_lag *ldev);
0021 #else
0022 static inline void mlx5_lag_mpesw_init(struct mlx5_lag *ldev) {}
0023 static inline void mlx5_lag_mpesw_cleanup(struct mlx5_lag *ldev) {}
0024 #endif
0025
0026 #endif