summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/ib_rep.h
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2018-01-29 10:40:37 +0000
committerSaeed Mahameed <saeedm@mellanox.com>2018-02-23 12:36:39 -0800
commitb96c9dde17359520d6a5a8eb6d56d91f22c5a413 (patch)
treead9a5077e2af22bb9acfd3c41b589a69e622b360 /drivers/infiniband/hw/mlx5/ib_rep.h
parent72afcf82477a58f40d748271a4a78755983203ef (diff)
downloadop-kernel-dev-b96c9dde17359520d6a5a8eb6d56d91f22c5a413.zip
op-kernel-dev-b96c9dde17359520d6a5a8eb6d56d91f22c5a413.tar.gz
IB/mlx5: E-Switch, Add rule to forward traffic to vport
In order to forward traffic from representor's SQ to the right virtual function, every time an SQ is created also add the corresponding flow rule to the FDB. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/ib_rep.h')
-rw-r--r--drivers/infiniband/hw/mlx5/ib_rep.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/ib_rep.h b/drivers/infiniband/hw/mlx5/ib_rep.h
index 923ad4c..832cfd3 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.h
+++ b/drivers/infiniband/hw/mlx5/ib_rep.h
@@ -17,6 +17,8 @@ struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
int vport_index);
void mlx5_ib_register_vport_reps(struct mlx5_ib_dev *dev);
void mlx5_ib_unregister_vport_reps(struct mlx5_ib_dev *dev);
+int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
+ struct mlx5_ib_sq *sq);
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
int vport_index);
#else /* CONFIG_MLX5_ESWITCH */
@@ -41,6 +43,12 @@ struct mlx5_eswitch_rep *mlx5_ib_vport_rep(struct mlx5_eswitch *esw,
static inline void mlx5_ib_register_vport_reps(struct mlx5_ib_dev *dev) {}
static inline void mlx5_ib_unregister_vport_reps(struct mlx5_ib_dev *dev) {}
+static inline int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev,
+ struct mlx5_ib_sq *sq)
+{
+ return 0;
+}
+
static inline
struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
int vport_index)
OpenPOWER on IntegriCloud