0001
0002
0003
0004
0005
0006 #ifndef __MLX5_IB_REP_H__
0007 #define __MLX5_IB_REP_H__
0008
0009 #include <linux/mlx5/eswitch.h>
0010 #include "mlx5_ib.h"
0011
0012 extern const struct mlx5_ib_profile raw_eth_profile;
0013
0014 #ifdef CONFIG_MLX5_ESWITCH
0015 int mlx5r_rep_init(void);
0016 void mlx5r_rep_cleanup(void);
0017 struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
0018 struct mlx5_ib_sq *sq,
0019 u32 port);
0020 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
0021 u16 vport_num);
0022 #else
0023 static inline int mlx5r_rep_init(void) { return 0; }
0024 static inline void mlx5r_rep_cleanup(void) {}
0025 static inline
0026 struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
0027 struct mlx5_ib_sq *sq,
0028 u32 port)
0029 {
0030 return NULL;
0031 }
0032
0033 static inline
0034 struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
0035 u16 vport_num)
0036 {
0037 return NULL;
0038 }
0039 #endif
0040 #endif