From: Vijaya Mohan Guvva Date: Fri, 24 Apr 2020 17:08:28 +0000 (-0400) Subject: bus/pci: fix UIO resource access from secondary process X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e6cf7bee1c77a0f321cea3494a106bfa5de6f53c;p=dpdk.git bus/pci: fix UIO resource access from secondary process For PCI devices presented through igb_uio, pcidev->mem_resource[] is not populated when the device is initialized for secondary process. Initialize pcidev->mem_resource[] with pci-bar mapped addresses. Fixes: eee16c964cd6 ("pci: support multiple PCI regions per device") Cc: stable@dpdk.org Signed-off-by: Vijaya Mohan Guvva Reviewed-by: Ferruh Yigit --- diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c index 7ea73dbc5b..f4dca9da91 100644 --- a/drivers/bus/pci/pci_common_uio.c +++ b/drivers/bus/pci/pci_common_uio.c @@ -70,6 +70,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev) } return -1; } + dev->mem_resource[i].addr = mapaddr; } return 0; }