net/mlx5: fix redundant Direct Verbs resources allocate
authorSuanming Mou <suanmingm@nvidia.com>
Wed, 28 Oct 2020 09:33:34 +0000 (17:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:04 +0000 (23:35 +0100)
commit291140c613999c7dd92bd83e957f0adecaf7ac31
tree3007d261777f18edbf4456f16a935c66e540bcff
parentafd7a62514adca11a2f26e4e320cc7d3aff72952
net/mlx5: fix redundant Direct Verbs resources allocate

All table, tag, header modify, header reformat are supported only on DV
mode. For the OFED version doesn't support these, create the related
redundant DV resources waste the memory.

Add the code section in the HAVE_IBV_FLOW_DV_SUPPORT macro to avoid the
redundant resources allocation.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c