bus/pci: fix UIO resource access from secondary process
authorVijaya Mohan Guvva <vijay1054@gmail.com>
Fri, 24 Apr 2020 17:08:28 +0000 (13:08 -0400)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 25 Apr 2020 20:41:58 +0000 (22:41 +0200)
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 <vijay1054@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/bus/pci/pci_common_uio.c

index 7ea73db..f4dca9d 100644 (file)
@@ -70,6 +70,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev)
                                }
                                return -1;
                        }
+                       dev->mem_resource[i].addr = mapaddr;
                }
                return 0;
        }