summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
diff options
context:
space:
mode:
authorEli Britstein <elibr@mellanox.com>2018-11-18 08:25:17 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-12-11 14:52:19 -0800
commit1228e912c9343d35b21663af82dea39dd8a575b8 (patch)
tree2467bb1455f8262bd5845223c7d43206ce345501 /drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
parent0bd72117fba2dd51a65eaa7b480adc0eea9a4409 (diff)
net/mlx5: Consider encapsulation properties when comparing destinations
Currently the driver identifies identical vport destinations by comparing the vport ID. The FW extended destination feature enables the driver to forward the packet to the same vport with multiple encapsulation properties. Change the vport destination comparison logic to compare the encapsulation properties in addition to the vport ID. Signed-off-by: Eli Britstein <elibr@mellanox.com> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Oz Shlomo <ozsh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 9d73eb955f75..f21277e636a3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -1373,7 +1373,10 @@ static bool mlx5_flow_dests_cmp(struct mlx5_flow_destination *d1,
{
if (d1->type == d2->type) {
if ((d1->type == MLX5_FLOW_DESTINATION_TYPE_VPORT &&
- d1->vport.num == d2->vport.num) ||
+ d1->vport.num == d2->vport.num &&
+ d1->vport.flags == d2->vport.flags &&
+ ((d1->vport.flags & MLX5_FLOW_DEST_VPORT_REFORMAT_ID) ?
+ (d1->vport.reformat_id == d2->vport.reformat_id) : true)) ||
(d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE &&
d1->ft == d2->ft) ||
(d1->type == MLX5_FLOW_DESTINATION_TYPE_TIR &&