net/mlx5: fix multiple flow table hash list
authorXiaoyu Min <jackmin@mellanox.com>
Mon, 16 Dec 2019 09:27:41 +0000 (11:27 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:45:23 +0000 (19:45 +0100)
commit6801116688fe82b5b32cf45ffa7b475d1cfdcea4
tree8dceb513a013afb04ae17ee3c2078bf9a3c03016
parentde561750c32692ae86df16f7bd5940d592971d88
net/mlx5: fix multiple flow table hash list

The eth devices which share one ibv device only need one hash list of
flow table.

Currently, flow table hash list is created per each eth device
whatever whether they share one ibv device or not.

If the devices share one ibv device, the previously created hash list
will become dangle because the pointer point to (sh->flow_tbls) is
overwritten by the later created hast list.

To fix this, just don't create hash list if it is already created.

Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
Cc: stable@dpdk.org
Reported-by: Zhike Wang <wangzhike@jd.com>
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5.c