]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Additional check for flow destination comparison
authorDmytro Linkin <dmitrolin@mellanox.com>
Thu, 2 May 2019 15:21:38 +0000 (15:21 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 17 May 2019 20:16:49 +0000 (13:16 -0700)
commitb391d04d975698768c42dc27ec821034cd95add5
tree08d3f40cd8724e7e46857600bdd9126e48bb9278
parent7ac1e85978f37ce71e8cc126b4dbf79d9593b9dc
net/mlx5e: Additional check for flow destination comparison

Flow destination comparison has an inaccuracy: code see no
difference between same vf ports, which belong to different pfs.

Example: If start ping from VF0 (PF1) to VF1 (PF1) and mirror
all traffic to VF0 (PF2), icmp reply to VF0 (PF1) and mirrored
flow to VF0 (PF2) would be determined as same destination. It lead
to creating flow handler with rule nodes, which not added to node
tree. When later driver try to delete this flow rules we got
kernel crash.

Add comparison of vhca_id field to avoid this.

Fixes: 495ec8e8d34f ("net/mlx5: Consider encapsulation properties when comparing destinations")
Signed-off-by: Dmytro Linkin <dmitrolin@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c