Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
---
 lib/librte_eal/linuxapp/eal/eal_pci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c 
b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 6f1a28a..ab08a16 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -390,6 +390,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t 
bus,

        /* device is valid, add in list (sorted) */
        if (TAILQ_EMPTY(&pci_device_list)) {
+               rte_eal_device_insert(&dev->device);
                TAILQ_INSERT_TAIL(&pci_device_list, dev, next);
        } else {
                struct rte_pci_device *dev2;
@@ -402,6 +403,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t 
bus,

                        if (ret < 0) {
                                TAILQ_INSERT_BEFORE(dev2, dev, next);
+                               rte_eal_device_insert(&dev->device);
                        } else { /* already registered */
                                dev2->kdrv = dev->kdrv;
                                dev2->max_vfs = dev->max_vfs;
@@ -411,6 +413,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t 
bus,
                        }
                        return 0;
                }
+               rte_eal_device_insert(&dev->device);
                TAILQ_INSERT_TAIL(&pci_device_list, dev, next);
        }

-- 
2.9.0

Reply via email to