common/mlx5: fix class combination validation
authorMichael Baum <michaelba@nvidia.com>
Sun, 12 Sep 2021 10:36:26 +0000 (13:36 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Sep 2021 21:15:08 +0000 (23:15 +0200)
commit288d7c3fa6e8bfca9e1e79a9712ec85d7179b3ce
tree72f8ed1cf079837cc6dbe227ab92a94a112e8d2f
parent97c9b0aa25d7b32cb4723389c31462a8f3be3f41
common/mlx5: fix class combination validation

The common probe function gets as a user argument the classes it should
create, and checks whether the combination is valid.

In case the device already exists, it checks the integration of the
above with the classes that the device has.
However, the function does not check the combination when the device
does not exist and it has to create it.

Check if the combination is valid for all cases.

Fixes: ad435d320473 ("common/mlx5: add bus-agnostic layer")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common.c