Skip to content

RFC Add mdev (Mediated device) support in DPDK

Tiwei Bie dpdk-dev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest5 patches 0 repliesNew
  2. v1 RFC3 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bus/pci: introduce an internal representation of PCI devicedrivers/bus/pci/bsd/pci.c drivers/bus/pci/linux/pci.c drivers/bus/pci/pci_common.c +1 more+35 -180 replies
2/5bus/pci: avoid depending on private value in kernel sourcedrivers/bus/pci/linux/pci.c drivers/bus/pci/linux/pci_init.h drivers/bus/pci/linux/pci_vfio.c +1 more+154 -400 replies
3/5bus/pci: introduce helper for MMIO read and writedrivers/bus/pci/bsd/pci.c drivers/bus/pci/linux/pci.c drivers/bus/pci/linux/pci_init.h +4 more+191 -00 replies
4/5eal: add a helper for reading string from sysfslib/librte_eal/common/eal_filesystem.h lib/librte_eal/freebsd/eal/eal.c lib/librte_eal/linux/eal/eal.c +1 more+55 -00 replies
5/5bus/pci: add mdev supportdrivers/bus/pci/linux/Makefile drivers/bus/pci/linux/pci.c drivers/bus/pci/linux/pci_init.h +6 more+404 -4817 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [dpdk-dev] [RFC v2 0/5] Add mdev (Mediated device) support in DPDK

Hi everyone,

This is a draft implementation of the mdev (Mediated device [1]) support in DPDK PCI bus driver. Mdev is a way to virtualize devices in Linux kernel. Based on the device-api (mdev_type/device_api), there could be different types of mdev devices (e.g. vfio-pci). In this RFCv2, the PCI bus driver is extended to support scanning and probing the mdev devices whose device-api is "vfio-pci".

                     +---------+
                     | PCI bus |
                     +----+----+
                          |
         +--------+-------+-------+--------+
         |        |               |        |
  Physical PCI devices ...   Mediated PCI devices ...

RFCv2:
- Let PCI bus scan mediated PCI devices directly
- Address Keith's comments
- Merge below patch into this series (David)
http://patches.dpdk.org/patch/55927/
- Add internal representation of PCI device (David)
- Minor fixes and improvements

[1] https://github.com/torvalds/linux/blob/master/Documentation/vfio-mediated-device.txt

Thanks,
Tiwei

Tiwei Bie (5):
bus/pci: introduce an internal representation of PCI device bus/pci: avoid depending on private value in kernel source bus/pci: introduce helper for MMIO read and write
eal: add a helper for reading string from sysfs bus/pci: add mdev support

 drivers/bus/pci/bsd/pci.c               |  36 ++-
 drivers/bus/pci/linux/Makefile          |   1 +
 drivers/bus/pci/linux/pci.c             | 105 ++++++--
 drivers/bus/pci/linux/pci_init.h        |  29 ++-
 drivers/bus/pci/linux/pci_uio.c         |  22 ++
 drivers/bus/pci/linux/pci_vfio.c        | 314 ++++++++++++++++++++----
 drivers/bus/pci/linux/pci_vfio_mdev.c   | 236 ++++++++++++++++++
 drivers/bus/pci/meson.build             |   3 +-
 drivers/bus/pci/pci_common.c            |  31 +--
 drivers/bus/pci/private.h               |  22 ++
 drivers/bus/pci/rte_bus_pci.h           |  65 ++++-
 drivers/bus/pci/rte_bus_pci_version.map |   7 +
 lib/librte_eal/common/eal_filesystem.h  |  10 +
 lib/librte_eal/freebsd/eal/eal.c        |  22 ++
 lib/librte_eal/linux/eal/eal.c          |  39 ++-
 lib/librte_eal/rte_eal_version.map      |   1 +
 16 files changed, 838 insertions(+), 105 deletions(-)
 create mode 100644 drivers/bus/pci/linux/pci_vfio_mdev.c
Signature · 1 line
2.17.1