From: Tiwei Bie <tiwei.bie@intel.com>
To: dev@dpdk.org
Cc: cunming.liang@intel.com, bruce.richardson@intel.com,
alejandro.lucero@netronome.com
Subject: [dpdk-dev] [RFC 0/3] Add mdev (Mediated device) support in DPDK
Date: Wed, 3 Apr 2019 15:18:41 +0800 [thread overview]
Message-ID: <20190403071844.21126-1-tiwei.bie@intel.com> (raw)
Message-ID: <20190403071841.YWn1WLUqShPRTRxmecrcLe41Af1IfiEnxQKTYbOs7-w@z> (raw)
Hi everyone,
This is a draft implementation of the mdev (Mediated device [1])
bus support in DPDK. 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 RFC,
one mdev bus is introduced to scan the mdev devices in the system
and do the probe based on the device-api.
Take the mdev devices whose device-api is "vfio-pci" as an example,
in this RFC, these devices will be probed by a mdev driver provided
by PCI bus, which will plug them to the PCI bus. And they will be
probed with the drivers registered on the PCI bus based on VendorID/
DeviceID/... then.
+----------+
| mdev bus |
+----+-----+
|
+----------------+----+------+------+
| | | |
mdev_vfio_pci ......
(device-api: vfio-pci)
There are also other ways to add mdev device support in DPDK (e.g.
let PCI bus scan /sys/bus/mdev/devices directly). Comments would be
appreciated!
[1] https://github.com/torvalds/linux/blob/master/Documentation/vfio-mediated-device.txt
Thanks,
Tiwei
Tiwei Bie (3):
eal: add a helper for reading string from sysfs
bus/mdev: add mdev bus support
bus/pci: add mdev support
config/common_base | 5 +
config/common_linux | 1 +
drivers/bus/Makefile | 1 +
drivers/bus/mdev/Makefile | 41 +++
drivers/bus/mdev/linux/Makefile | 6 +
drivers/bus/mdev/linux/mdev.c | 117 ++++++++
drivers/bus/mdev/mdev.c | 310 ++++++++++++++++++++++
drivers/bus/mdev/meson.build | 15 ++
drivers/bus/mdev/private.h | 90 +++++++
drivers/bus/mdev/rte_bus_mdev.h | 141 ++++++++++
drivers/bus/mdev/rte_bus_mdev_version.map | 12 +
drivers/bus/meson.build | 2 +-
drivers/bus/pci/Makefile | 3 +
drivers/bus/pci/linux/Makefile | 4 +
drivers/bus/pci/linux/pci_vfio.c | 35 ++-
drivers/bus/pci/linux/pci_vfio_mdev.c | 305 +++++++++++++++++++++
drivers/bus/pci/meson.build | 4 +-
drivers/bus/pci/pci_common.c | 17 +-
drivers/bus/pci/private.h | 9 +
drivers/bus/pci/rte_bus_pci.h | 11 +-
lib/librte_eal/common/eal_filesystem.h | 7 +
lib/librte_eal/freebsd/eal/eal.c | 22 ++
lib/librte_eal/linux/eal/eal.c | 22 ++
lib/librte_eal/rte_eal_version.map | 1 +
mk/rte.app.mk | 1 +
25 files changed, 1163 insertions(+), 19 deletions(-)
create mode 100644 drivers/bus/mdev/Makefile
create mode 100644 drivers/bus/mdev/linux/Makefile
create mode 100644 drivers/bus/mdev/linux/mdev.c
create mode 100644 drivers/bus/mdev/mdev.c
create mode 100644 drivers/bus/mdev/meson.build
create mode 100644 drivers/bus/mdev/private.h
create mode 100644 drivers/bus/mdev/rte_bus_mdev.h
create mode 100644 drivers/bus/mdev/rte_bus_mdev_version.map
create mode 100644 drivers/bus/pci/linux/pci_vfio_mdev.c
--
2.17.1
next reply other threads:[~2019-04-03 7:19 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 7:18 Tiwei Bie [this message]
2019-04-03 7:18 ` Tiwei Bie
2019-04-03 7:18 ` [dpdk-dev] [RFC 1/3] eal: add a helper for reading string from sysfs Tiwei Bie
2019-04-03 7:18 ` Tiwei Bie
2019-04-03 7:18 ` [dpdk-dev] [RFC 2/3] bus/mdev: add mdev bus support Tiwei Bie
2019-04-03 7:18 ` Tiwei Bie
2019-04-03 7:18 ` [dpdk-dev] [RFC 3/3] bus/pci: add mdev support Tiwei Bie
2019-04-03 7:18 ` Tiwei Bie
2019-04-03 14:13 ` Wiles, Keith
2019-04-03 14:13 ` Wiles, Keith
2019-04-04 4:19 ` Tiwei Bie
2019-04-04 4:19 ` Tiwei Bie
2019-04-08 8:44 ` [dpdk-dev] [RFC 0/3] Add mdev (Mediated device) support in DPDK Alejandro Lucero
2019-04-08 8:44 ` Alejandro Lucero
2019-04-08 9:36 ` Tiwei Bie
2019-04-08 9:36 ` Tiwei Bie
2019-04-10 10:02 ` Francois Ozog
2019-04-10 10:02 ` Francois Ozog
2023-07-03 23:54 ` Stephen Hemminger
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 0/5] " Tiwei Bie
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 1/5] bus/pci: introduce an internal representation of PCI device Tiwei Bie
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 2/5] bus/pci: avoid depending on private value in kernel source Tiwei Bie
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 3/5] bus/pci: introduce helper for MMIO read and write Tiwei Bie
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 4/5] eal: add a helper for reading string from sysfs Tiwei Bie
2019-07-15 7:52 ` [dpdk-dev] [RFC v2 5/5] bus/pci: add mdev support Tiwei Bie
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 0/6] Add mdev (Mediated device) support in DPDK Chenbo Xia
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 1/6] bus/pci: introduce an internal representation of PCI device Chenbo Xia
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 2/6] bus/pci: avoid depending on private value in kernel source Chenbo Xia
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 3/6] bus/pci: introduce helper for MMIO read and write Chenbo Xia
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 4/6] eal: add a helper for reading string from sysfs Chenbo Xia
2021-06-01 5:37 ` Stephen Hemminger
2021-06-08 5:47 ` Xia, Chenbo
2021-06-01 5:39 ` Stephen Hemminger
2021-06-08 5:48 ` Xia, Chenbo
2021-06-11 7:19 ` Thomas Monjalon
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 5/6] bus/pci: add mdev support Chenbo Xia
2021-06-01 3:06 ` [dpdk-dev] [RFC v3 6/6] bus/pci: add sparse mmap support for mediated PCI devices Chenbo Xia
2021-06-11 7:15 ` [dpdk-dev] [RFC v3 0/6] Add mdev (Mediated device) support in DPDK Thomas Monjalon
2021-06-15 2:49 ` Xia, Chenbo
2021-06-15 7:48 ` Thomas Monjalon
2021-06-15 10:44 ` Xia, Chenbo
2021-06-15 11:57 ` Jason Gunthorpe
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=20190403071844.21126-1-tiwei.bie@intel.com \
--to=tiwei.bie@intel.com \
--cc=alejandro.lucero@netronome.com \
--cc=bruce.richardson@intel.com \
--cc=cunming.liang@intel.com \
--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).