]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commitc979c445a88e1c9dd7d8f90838c10456ae4ecd09
tree08d3f40cd8724e7e46857600bdd9126e48bb9278
parentcf83c8fdcd4756644595521f48748ec22f7efede
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: 1228e912c934 ("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