net/mlx5: fix tunnel offload hub multi-thread protection
authorGregory Etelson <getelson@nvidia.com>
Mon, 16 Nov 2020 14:02:22 +0000 (16:02 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:04 +0000 (21:10 +0100)
commit868d2e342cf3eb5120cfcacc2488a6c21cdc6f3a
tree651b03671041d9e38e8fa46bcb5dbce93a0b188c
parent9cac7ded37479ec59ca2f52c043a5e4326c24a22
net/mlx5: fix tunnel offload hub multi-thread protection

The original patch was removing active tunnel offload objects from a
tunnels db list without checking its reference counter value.
That action was leading to a PMD crash.

Current patch isolates tunnels db list into a separate API. That API
manages MT protection of the tunnel offload db.

Fixes: 5b38d8cd4663 ("net/mlx5: make tunnel hub list thread safe")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h