vdpa/mlx5: fix PCI address comparison
authorMatan Azrad <matan@mellanox.com>
Mon, 4 May 2020 07:12:09 +0000 (07:12 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
commit11e2ed9e439071df3964b634688d474d8cd7c17f
treeda39db70f24e6b9ef52f9b95943d28095b27b45a
parent3fc1d87c2a2055b6a0c9e0f3c456bfe14f95c217
vdpa/mlx5: fix PCI address comparison

A regular memcmp function was used to compare between two objects of
type `struct rte_pci_addr`.

Due to the alignment rules of compiler structure builders, some memory
is not initiated in the structure even though all the fields were
initiated.

Therefore, the comparison may fail even though the PCI addresses are
identical and to cause false failure in probe.

Use the dedicated API to compare 2 PCI addresses.

Fixes: 75dd0ae91765 ("vdpa/mlx5: disable RoCE")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Tested-by: Noa Ezra <noae@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa.c