Move PCI away from the EAL
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest25 patches 5 repliesIn review
- v725 patches 0 repliesSuperseded
- v520 patches 5 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 16 patches | 0 replies | Superseded | |
| v3 | 13 patches | 0 replies | Superseded | |
| v2 | 14 patches | 10 replies | Superseded | |
| v1 | 13 patches | 3 replies | Superseded |
Changes in v8 from the cover letter
+ Fix compilation issues between commits in EAL vfio related parts. Keep proper includes when necessary, moved a few VFIO_PCI specific symbols around.
+ Added drivers/bus/pci tree to MAINTAINERS file, with no owner.
Patches in v8 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/25 | ethdev: remove useless PCI dependencylib/ | +0 | 0 replies | |
| 2/25 | eal: include debug header in bus sourcelib/ | +1 | 0 replies | |
| 3/25 | eal: include stdint in private headerlib/ | +1 | 0 replies | |
| 4/25 | eal: include common headerlib/ | +2 | 0 replies | |
| 5/25 | eal: expose rte_eal_using_phys_addrslib/ lib/ lib/ +2 more | +19 | 0 replies | |
| 6/25 | eal: expose internal config elementslib/ lib/ lib/ +1 more | +63 | 0 replies | |
| 7/25 | eal: expose vfio symbolsdrivers/ lib/ lib/ +10 more | +197 | 0 replies | |
| 8/25 | vfio: remove useless PCI headerslib/ | +0 | 0 replies | |
| 9/25 | vfio: check PCI dependency from within PCI codelib/ lib/ | +5 | 0 replies | |
| 10/25 | vfio: move PCI-related symbols out of vfio headerlib/ lib/ lib/ | +15 | 0 replies | |
| 11/25 | pci: avoid inlining functionslib/ lib/ lib/ | +78 | 0 replies | |
| 12/25 | pci: avoid over-complicated macrolib/ | +46 | 0 replies | |
| 13/25 | pci: deprecate misnamed functionsdoc/ lib/ lib/ +1 more | +82 | 0 replies | |
| 14/25 | pci: introduce PCI address parsing functionlib/ lib/ lib/ | +24 | 0 replies | |
| 15/25 | pci: make specialized parsing functions privatedoc/ lib/ lib/ +1 more | +4 | 0 replies | |
| 16/25 | pci: use new PCI addr comparison functionlib/ lib/ lib/ +2 more | +10 | 0 replies | |
| 17/25 | pci: use new PCI addr parsing functionlib/ | +1 | 0 replies | |
| 18/25 | pci: do not expose private functionslib/ lib/ lib/ | +49 | 0 replies | |
| 19/25 | pci: do not expose PCI match functionlib/ lib/ lib/ | +15 | 0 replies | |
| 20/25 | pci: do not expose IOVA mode getterlib/ lib/ lib/ | +10 | 0 replies | |
| 21/25 | pci: use EAL exposed configurationlib/ lib/ lib/ +1 more | +14 | 0 replies | |
| 22/25 | net/bonding: use local prefix for local functiondrivers/ | +2 | 0 replies | |
| 23/25 | pci: introduce PCI lib and busapp/ config/ drivers/ +101 more | +5103 | 2 replies | |
| 24/25 | doc: add notes on EAL PCI API updatedoc/ | +28 | 0 replies | |
| 25/25 | maintainers: claim maintainership of PCI libMAINTAINERS | +9 | 0 replies |
Reviews trailers per patch
1 of 25 patches has a Reviewed-by or Acked-by.
| Patch | John McNamara |
|---|---|
| 1/25 | |
| 2/25 | |
| 3/25 | |
| 4/25 | |
| 5/25 | |
| 6/25 | |
| 7/25 | |
| 8/25 | |
| 9/25 | |
| 10/25 | |
| 11/25 | |
| 12/25 | |
| 13/25 | |
| 14/25 | |
| 15/25 | |
| 16/25 | |
| 17/25 | |
| 18/25 | |
| 19/25 | |
| 20/25 | |
| 21/25 | |
| 22/25 | |
| 23/25 | |
| 24/25 | A-b |
| 25/25 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 00/25] Move PCI away from the EAL
Hi all,
Here is a new version of the PCI bus move out of the EAL.
The EAL PCI implementation is divided in two parts:
- librte_pci: library offering helpers to handle PCI objects
- librte_bus_pci: bus driver for PCI devices
This allows other libraries / tools to use PCI elements (location, mappings, parsing operations, etc) without forcing a dependency on a bus driver.
The latter should not have to export helpers that others might need. It is focused on defining the rte_pci_device, rte_pci_driver objects and their handling.
The cryptodev library has hard dependencies on rte_pci_devices (used by generic probe function). Other similar libs (ether and eventdev) avoided the issue by inlining such functions and expecting users to include the relevant headers once the PCI bus has already been built.
After review from Declan, he proposed to submit a patch removing this dependency. Once this patch is submitted, the relevant commit will be dropped from this patchset.
v2:
+ Made rte_eal_using_phys_addrs common to both linux and bsd interfaces.
+ Added documentation of EAL API changes in release note.
+ Fixed a few rebase-related mistakes.
+ Fixed parallel build race condition reported by Luca Boccassi.
+ Grouped together commits breaking compilation:
-> pci: introduce PCI lib and bus
-> lib: include rte_bus_pci
-> drivers: include rte_bus_pci
-> test: include rte_bus_pci
-> app/testpmd: include rte_bus_pci
-> cryptodev: move PCI specific helpers to drivers/cryptoUntil all of them have been applied, compilation is broken. I am currently wondering whether merging some of them might be sensible.
+ Not included in this series:
Several filesystem-related functions are currently
private to the EAL and directly linked. This is not good,
but the solution seems to be to have a new lib offering an FS abstraction. This seems an overreach for this patchset and should probably come in a second step.
v3:
+ Fixed .map versioning
+ merged one commit breaking the build into the main commit moving code around.
Other such commits are still present, as they only break specific subsystems (lib, drivers, apps, cryptodev). Merging them all within the one main commit does not seem right.
As such, build is still broken from
* pci: introduce PCI lib and bus
until
* cryptodev: move PCI specific helpers to drivers/crypto
v4:
+ Rebased unto master, with new PCI functionalities integrated.
+ Removed the exposition of private EAL functions.
While one commit did deal with this for one function, the issue is more widespread and should be fixed in a more generic way.
+ Introduced new PCI address parsing function,
deprecating the old ones.
+ Fix conflict with bonding PMD regarding pci_addr_cmp function name.
v5:
+ Rebase unto master: fix a few compilation issues with the header change.
+ Make more PCI bus functions private.
v6: (Not sent publicly)
+ Made a mistake when formatting the patches.
+ fixed a rebase error in the commit
bus/pci: do not expose IOVA mode getter
~*~
Compilation is still broken from
* pci: introduce PCI lib and bus
until
* net/bonding: use local prefix for local function
v7:
+ Fixed compilation issues with shared build This required exposing several private EAL symbols from VFIO and internal_config.
For VFIO
+ Squashed all commits breaking compilation into
the single big move. compilation is stable throughout the series now.
+ Removed cryptodev commit, now based upon Declan's work (see patchset dependencies).
+ Moved PCI enhancement prior to moving code into the lib and bus. Thanks to Aaron Conole for the suggestion.
+ Fixed build on FreeBSD
+ Claimed ownership on librte_pci, for the time being.
v8:
+ Fix compilation issues between commits in EAL vfio related parts. Keep proper includes when necessary, moved a few VFIO_PCI specific symbols around.
+ Added drivers/bus/pci tree to MAINTAINERS file, with no owner.
This patchset depends on:
Break dependency on bus infrastructure
http://dpdk.org/ml/archives/dev/2017-October/079827.html
Gaetan Rivet (25):
ethdev: remove useless PCI dependency
eal: include debug header in bus source
eal: include stdint in private header
eal: include common header
eal: expose rte_eal_using_phys_addrs
eal: expose internal config elements
eal: expose vfio symbols
vfio: remove useless PCI headers
vfio: check PCI dependency from within PCI code
vfio: move PCI-related symbols out of vfio header
pci: avoid inlining functions
pci: avoid over-complicated macro
pci: deprecate misnamed functions
pci: introduce PCI address parsing function
pci: make specialized parsing functions private
pci: use new PCI addr comparison function
pci: use new PCI addr parsing function
pci: do not expose private functions
pci: do not expose PCI match function
pci: do not expose IOVA mode getter
pci: use EAL exposed configuration net/bonding: use local prefix for local function
pci: introduce PCI lib and bus
doc: add notes on EAL PCI API update
maintainers: claim maintainership of PCI lib
MAINTAINERS | 9 + app/test-pmd/testpmd.h | 1 + config/common_base | 10 + doc/guides/rel_notes/deprecation.rst | 7 + doc/guides/rel_notes/release_17_11.rst | 28 + drivers/bus/Makefile | 2 + drivers/bus/fslmc/fslmc_vfio.h | 2 + drivers/bus/pci/Makefile | 62 ++ drivers/bus/pci/bsd/Makefile | 32 + drivers/bus/pci/bsd/pci.c | 681 ++++++++++++++++++++ drivers/bus/pci/include/rte_bus_pci.h | 340 ++++++++++ drivers/bus/pci/linux/Makefile | 36 ++ drivers/bus/pci/linux/pci.c | 826 +++++++++++++++++++++++++ drivers/bus/pci/linux/pci_init.h | 111 ++++ drivers/bus/pci/linux/pci_uio.c | 568 +++++++++++++++++ drivers/bus/pci/linux/pci_vfio.c | 756 ++++++++++++++++++++++ drivers/bus/pci/pci_common.c | 541 ++++++++++++++++ drivers/bus/pci/pci_common_uio.c | 235 +++++++ drivers/bus/pci/private.h | 248 ++++++++ drivers/bus/pci/rte_bus_pci_version.map | 17 + drivers/crypto/qat/Makefile | 1 + drivers/crypto/qat/qat_qp.c | 1 + drivers/crypto/qat/rte_qat_cryptodev.c | 1 + drivers/event/octeontx/Makefile | 1 + drivers/event/skeleton/Makefile | 1 + drivers/mempool/octeontx/Makefile | 1 + drivers/mempool/octeontx/octeontx_fpavf.c | 2 +- drivers/mempool/octeontx/octeontx_ssovf.c | 1 + drivers/net/ark/Makefile | 1 + drivers/net/ark/ark_ethdev.c | 1 + drivers/net/avp/Makefile | 1 + drivers/net/avp/avp_ethdev.c | 2 + drivers/net/bnx2x/Makefile | 1 + drivers/net/bnxt/Makefile | 1 + drivers/net/bnxt/bnxt.h | 1 + drivers/net/bonding/Makefile | 1 + drivers/net/bonding/rte_eth_bond_args.c | 5 +- drivers/net/cxgbe/Makefile | 1 + drivers/net/cxgbe/base/adapter.h | 1 + drivers/net/cxgbe/cxgbe_ethdev.c | 1 + drivers/net/e1000/Makefile | 1 + drivers/net/e1000/em_ethdev.c | 1 + drivers/net/e1000/igb_ethdev.c | 1 + drivers/net/e1000/igb_pf.c | 1 + drivers/net/ena/Makefile | 1 + drivers/net/ena/ena_ethdev.h | 1 + drivers/net/enic/Makefile | 1 + drivers/net/enic/base/vnic_dev.h | 4 +- drivers/net/enic/enic_ethdev.c | 1 + drivers/net/enic/enic_main.c | 1 + drivers/net/fm10k/Makefile | 1 + drivers/net/i40e/Makefile | 1 + drivers/net/i40e/i40e_ethdev.c | 1 + drivers/net/i40e/i40e_ethdev_vf.c | 1 + drivers/net/ixgbe/Makefile | 1 + drivers/net/ixgbe/ixgbe_ethdev.c | 1 + drivers/net/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/liquidio/Makefile | 1 + drivers/net/mlx4/Makefile | 1 + drivers/net/mlx4/mlx4_ethdev.c | 1 + drivers/net/mlx5/Makefile | 1 + drivers/net/mlx5/mlx5.c | 1 + drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/nfp/Makefile | 1 + drivers/net/nfp/nfp_nfpu.c | 2 +- drivers/net/nfp/nfp_nfpu.h | 2 +- drivers/net/octeontx/Makefile | 1 + drivers/net/octeontx/base/octeontx_pkivf.c | 2 +- drivers/net/octeontx/base/octeontx_pkovf.c | 2 +- drivers/net/qede/Makefile | 1 + drivers/net/sfc/Makefile | 1 + drivers/net/sfc/sfc.h | 1 + drivers/net/sfc/sfc_ethdev.c | 1 + drivers/net/szedata2/Makefile | 1 + drivers/net/thunderx/Makefile | 1 + drivers/net/thunderx/nicvf_ethdev.c | 1 + drivers/net/virtio/Makefile | 1 + drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_pci.h | 1 + drivers/net/vmxnet3/Makefile | 1 + drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 + lib/Makefile | 2 + lib/librte_eal/bsdapp/eal/Makefile | 3 - lib/librte_eal/bsdapp/eal/eal.c | 58 +- lib/librte_eal/bsdapp/eal/eal_memory.c | 6 + lib/librte_eal/bsdapp/eal/eal_pci.c | 680 -------------------- lib/librte_eal/common/Makefile | 4 +- lib/librte_eal/common/arch/x86/rte_cycles.c | 2 + lib/librte_eal/common/eal_common_bus.c | 1 + lib/librte_eal/common/eal_common_pci.c | 579 ----------------- lib/librte_eal/common/eal_common_pci_uio.c | 233 ------- lib/librte_eal/common/eal_private.h | 144 +---- lib/librte_eal/common/include/rte_eal.h | 28 + lib/librte_eal/common/include/rte_memory.h | 11 + lib/librte_eal/common/include/rte_pci.h | 633 ------------------- lib/librte_eal/common/include/rte_vfio.h | 139 +++++ lib/librte_eal/linuxapp/eal/Makefile | 8 - lib/librte_eal/linuxapp/eal/eal.c | 23 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +- lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 818 ------------------------ lib/librte_eal/linuxapp/eal/eal_pci_init.h | 97 --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 567 ----------------- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 750 ---------------------- lib/librte_eal/linuxapp/eal/eal_vfio.c | 1 + lib/librte_eal/linuxapp/eal/eal_vfio.h | 38 -- lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 4 +- lib/librte_eal/rte_eal_version.map | 26 +- lib/librte_ether/rte_ethdev.c | 1 - lib/librte_ether/rte_ethdev.h | 2 - lib/librte_ether/rte_ethdev_pci.h | 1 + lib/librte_eventdev/rte_eventdev_pmd_pci.h | 1 + lib/librte_pci/Makefile | 49 ++ lib/librte_pci/include/rte_pci.h | 279 +++++++++ lib/librte_pci/rte_pci.c | 220 +++++++ lib/librte_pci/rte_pci_version.map | 15 + mk/rte.app.mk | 3 + test/test/test_kni.c | 1 + test/test/virtual_pmd.c | 1 + 119 files changed, 5428 insertions(+), 4590 deletions(-) create mode 100644 drivers/bus/pci/Makefile create mode 100644 drivers/bus/pci/bsd/Makefile create mode 100644 drivers/bus/pci/bsd/pci.c create mode 100644 drivers/bus/pci/include/rte_bus_pci.h create mode 100644 drivers/bus/pci/linux/Makefile create mode 100644 drivers/bus/pci/linux/pci.c create mode 100644 drivers/bus/pci/linux/pci_init.h create mode 100644 drivers/bus/pci/linux/pci_uio.c create mode 100644 drivers/bus/pci/linux/pci_vfio.c create mode 100644 drivers/bus/pci/pci_common.c create mode 100644 drivers/bus/pci/pci_common_uio.c create mode 100644 drivers/bus/pci/private.h create mode 100644 drivers/bus/pci/rte_bus_pci_version.map delete mode 100644 lib/librte_eal/bsdapp/eal/eal_pci.c delete mode 100644 lib/librte_eal/common/eal_common_pci.c delete mode 100644 lib/librte_eal/common/eal_common_pci_uio.c delete mode 100644 lib/librte_eal/common/include/rte_pci.h create mode 100644 lib/librte_eal/common/include/rte_vfio.h delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci.c delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_init.h delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c create mode 100644 lib/librte_pci/Makefile create mode 100644 lib/librte_pci/include/rte_pci.h create mode 100644 lib/librte_pci/rte_pci.c create mode 100644 lib/librte_pci/rte_pci_version.map
Signature · 1 line
2.1.4