[dpdk-dev] [PATCH] vdpa/mlx5: fix PCI address comparison

Maxime Coquelin maxime.coquelin at redhat.com
Mon May 4 11:15:22 CEST 2020



On 5/4/20 9:12 AM, Matan Azrad wrote:
> 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 at dpdk.org
> 
> Signed-off-by: Matan Azrad <matan at mellanox.com>
> Tested-by: Noa Ezra <noae at mellanox.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list