net/mlx5: fix port shared data reference count
authorXueming Li <xuemingl@nvidia.com>
Wed, 21 Oct 2020 11:15:23 +0000 (11:15 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:25 +0000 (23:24 +0100)
commit16dbba257c9ceccb30577d189dc6ca7e1042552f
treea07e9c7c1427b698c267da138480f92c8f7e38fb
parent42dcd453d9b63841a5460a6ca3872eb7648d73bd
net/mlx5: fix port shared data reference count

When probe a representor, tag cache hash table and modification cache
hash table allocated memory upon each port, overwrote previous existing
cache in shared context data.

This patch moves reference check of shared data prior to hash table
allocation to avoid such issue.

Fixes: 6801116688fe ("net/mlx5: fix multiple flow table hash list")
Fixes: 1ef4cdef2682 ("net/mlx5: fix flow tag hash list conversion")
Cc: stable@dpdk.org
Acked-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow_dv.c