From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla@dpdk.org Subject: [Bug 85] pci_scan_one() issue Date: Mon, 27 Aug 2018 05:43:49 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D85 Bug ID: 85 Summary: pci_scan_one() issue Product: DPDK Version: 17.11 Hardware: All OS: Linux Status: CONFIRMED Severity: major Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: geoffrey.lv@gmail.com Target Milestone: --- /* Scan one pci sysfs entry, and fill the devices list from it. */ static int pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) This function is at drivers/bus/pci/linux/pci.c, and please refer to below code: } else { /* already registered */ dev2->kdrv =3D dev->kdrv; dev2->max_vfs =3D dev->max_vfs; pci_name_set(dev2); memmove(dev2->mem_resource, dev->mem_resour= ce, sizeof(dev->mem_resource)); free(dev); } If this device is already registered, this function will replace the mem_resource. But some devices need to map the PCI resource of a PCI device in virtual memory, which means dev2->mem_resource[i].addr is not 0, and it's overwritt= en here.=20 When we attach a new device, calling sequence is: rte_eth_dev_attach()->rte_eal_hotplug_add()->rte_pci_scan()->pci_scan_one() For already registered devices, mem_resource[i].addr is set to 0, and DPDK = will not invoke rte_pci_map_device() for these devices. --=20 You are receiving this mail because: You are the assignee for the bug.=