From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 85] pci_scan_one() issue
Date: Mon, 27 Aug 2018 05:43:49 +0000 [thread overview]
Message-ID: <bug-85-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=85
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 = dev->kdrv;
dev2->max_vfs = dev->max_vfs;
pci_name_set(dev2);
memmove(dev2->mem_resource, dev->mem_resource,
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 overwritten
here.
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.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2018-08-27 5:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-85-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).