On Friday 16 December 2016 06:40 PM, Shreyansh Jain wrote:
Register a PCI bus with Scan/match and probe callbacks. Necessary changes
in EAL layer for enabling bus interfaces. PCI devices and drivers now
reside within the Bus object.
Now that PCI bus handles the scan/probe methods, independent calls to
PCI scan and probe can be removed from the code.
PCI device and driver list are also removed.
rte_device and rte_driver list continue to exist. As does the VDEV lists.
Changes to test_pci:
- use a dummy test_pci_bus for all PCI test driver registrations
- this reduces the need for cleaning global list
- add necessary callbacks for invoking scan and probing/matching
using EAL PCI scan code
Note: With this patch, all PCI PMDs would cease to work because of lack
rte_driver->probe/remove implementations. Next patch would do that.
Signed-off-by: Shreyansh Jain <shreyansh.j...@nxp.com>
---
app/test/test_pci.c | 154 +++++++++++------
lib/librte_eal/bsdapp/eal/eal.c | 7 -
lib/librte_eal/bsdapp/eal/eal_pci.c | 52 +++---
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +-
lib/librte_eal/common/eal_common_pci.c | 212 ++++++++++++++----------
lib/librte_eal/common/eal_private.h | 14 +-
lib/librte_eal/common/include/rte_pci.h | 53 +++---
lib/librte_eal/linuxapp/eal/eal.c | 7 -
lib/librte_eal/linuxapp/eal/eal_pci.c | 57 ++++---
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +-
10 files changed, 330 insertions(+), 240 deletions(-)
<snip>
This is a relatively large patch. I would love to split it but
currently I am unable to find a nice/clean way. Any suggestions would
be really appreciated:
This currently does 3 broad things:
- Move the PCI device/driver registration to PCI Bus
-- So, introduce PCI bus
-- change EAL to point to this new bus
- remove/refactor existing EAL/*/*pci* code to accommodate this shift
- Test PCI framework.
I could have split test_pci changes into a new patch, but that breaks
compilation after this patchset if test_pci compilation is enabled
(disabled by default). Is that acceptable? (if not, I am stuck with
keeping this set of changes into a single patch).
And, I would appreciate some help in confirming if the changes to
test_pci are OK or not from PCI testing perspective.
-
Shreyansh