2018-06-05 04:53:53 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
|
2018-01-16 14:34:48 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Mellanox Technologies. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __MLX5_IB_REP_H__
|
|
|
|
#define __MLX5_IB_REP_H__
|
|
|
|
|
|
|
|
#include <linux/mlx5/eswitch.h>
|
|
|
|
#include "mlx5_ib.h"
|
|
|
|
|
2019-11-08 23:45:26 +00:00
|
|
|
extern const struct mlx5_ib_profile raw_eth_profile;
|
2019-02-13 06:55:34 +00:00
|
|
|
|
2020-05-06 07:16:01 +00:00
|
|
|
#ifdef CONFIG_MLX5_ESWITCH
|
2020-10-04 04:35:36 +00:00
|
|
|
int mlx5r_rep_init(void);
|
|
|
|
void mlx5r_rep_cleanup(void);
|
2019-03-28 13:27:38 +00:00
|
|
|
struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
|
|
|
|
struct mlx5_ib_sq *sq,
|
2021-03-01 07:04:20 +00:00
|
|
|
u32 port);
|
2018-01-16 15:02:36 +00:00
|
|
|
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
|
2019-04-05 06:07:19 +00:00
|
|
|
u16 vport_num);
|
2018-01-16 14:34:48 +00:00
|
|
|
#else /* CONFIG_MLX5_ESWITCH */
|
2020-10-04 04:35:36 +00:00
|
|
|
static inline int mlx5r_rep_init(void) { return 0; }
|
|
|
|
static inline void mlx5r_rep_cleanup(void) {}
|
2019-03-28 13:27:38 +00:00
|
|
|
static inline
|
|
|
|
struct mlx5_flow_handle *create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
|
|
|
|
struct mlx5_ib_sq *sq,
|
2021-03-01 07:04:20 +00:00
|
|
|
u32 port)
|
2018-01-29 10:40:37 +00:00
|
|
|
{
|
2019-03-28 13:27:38 +00:00
|
|
|
return NULL;
|
2018-01-29 10:40:37 +00:00
|
|
|
}
|
|
|
|
|
2018-01-16 15:02:36 +00:00
|
|
|
static inline
|
|
|
|
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
|
2019-04-05 06:07:19 +00:00
|
|
|
u16 vport_num)
|
2018-01-16 15:02:36 +00:00
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2018-01-16 14:34:48 +00:00
|
|
|
#endif
|
|
|
|
#endif /* __MLX5_IB_REP_H__ */
|