diff options
author | Erez Shitrit <erezsh@nvidia.com> | 2023-08-28 14:37:12 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-09-19 23:33:08 -0700 |
commit | 3b81bcbaee28213ba7e6061c523db918c594ad67 (patch) | |
tree | 7cdaa3ff6d551a2702e97da2cf4a49ed4366e2a3 /drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c | |
parent | f6f46e7173cb4613b84a0c0640355826ee39654f (diff) |
net/mlx5: DR, Handle multi destination action in the right order
Whenever we have few destinations from Flow-table type we need to put
the one that goes to the wire to be the last one.
We are using FW in order to get iterator, the FW uses RX for the first
destinations and TX for the last destination, if we want the packet to
be directed to the wire it should be done in the TX path and not in the
RX.
The code now checks if the FT is directed to the wire and if so puts it
as the last destination.
Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c index 14f6df88b1f9..50c2554c9ccf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/fs_dr.c @@ -209,10 +209,17 @@ static struct mlx5dr_action *create_ft_action(struct mlx5dr_domain *domain, struct mlx5_flow_rule *dst) { struct mlx5_flow_table *dest_ft = dst->dest_attr.ft; + struct mlx5dr_action *tbl_action; if (mlx5dr_is_fw_table(dest_ft)) return mlx5dr_action_create_dest_flow_fw_table(domain, dest_ft); - return mlx5dr_action_create_dest_table(dest_ft->fs_dr_table.dr_table); + + tbl_action = mlx5dr_action_create_dest_table(dest_ft->fs_dr_table.dr_table); + if (tbl_action) + tbl_action->dest_tbl->is_wire_ft = + dest_ft->flags & MLX5_FLOW_TABLE_UPLINK_VPORT ? 1 : 0; + + return tbl_action; } static struct mlx5dr_action *create_range_action(struct mlx5dr_domain *domain, |