net/mlx5: fix Direct Verbs flow descriptor allocation
authorGregory Etelson <getelson@nvidia.com>
Tue, 8 Dec 2020 08:17:05 +0000 (10:17 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:05 +0000 (16:03 +0100)
commit3ab5a3a7acafdf35ad4b8b1e7805ce7663c786c6
treeb3aed8ee63b77b87a7cbf05c7a8ca4f53cbc239f
parent75c6287f250f2ee1f8b3dcfac66ef17376f46149
net/mlx5: fix Direct Verbs flow descriptor allocation

Initialize flow descriptor tunnel member during flow creation.
Prevent access to stale data and pointers when flow descriptor is
reallocated after release.
Fix flow index validation.

Fixes: e7bfa3596a0a ("net/mlx5: separate the flow handle resource")
Fixes: 8bb81f2649b1 ("net/mlx5: use thread specific flow workspace")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c