diff options
author | Mark Bloch <markb@mellanox.com> | 2018-01-29 13:40:37 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-02-23 23:36:39 +0300 |
commit | b96c9dde17359520d6a5a8eb6d56d91f22c5a413 (patch) | |
tree | ad9a5077e2af22bb9acfd3c41b589a69e622b360 /drivers/infiniband/hw/mlx5/ib_rep.h | |
parent | 72afcf82477a58f40d748271a4a78755983203ef (diff) | |
download | linux-b96c9dde17359520d6a5a8eb6d56d91f22c5a413.tar.xz |
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.h | 8 |
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 923ad4cba941..832cfd382ecc 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) |