Re: [dpdk-dev] [PATCH 2/4] bus/pci: fix PCI address compare

2018-07-18 Thread Gaƫtan Rivet
On Thu, Jul 12, 2018 at 10:01:42PM +0800, Qi Zhang wrote: > When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr) > is 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr > is valid. So compare the 8th byte will cause the unexpected result, which > happens when

[dpdk-dev] [PATCH 2/4] bus/pci: fix PCI address compare

2018-07-12 Thread Qi Zhang
When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr) is 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr is valid. So compare the 8th byte will cause the unexpected result, which happens when repeatedly attach/detach a device. Fixes: 94c0776b1bad ("vfio: su