since v1:
- dropped the <description> element from the parent device nested capability
- added missing RNG schema and tests
- updated the documentation to describe the MDEV elements in both the parent
and the child
So, regarding the discussion about the presence of <description> element in the
device XML, I dropped it for v2. There were points that we could continue
debating about, but one of the major points against it is that libvirt should
understand the information it's gathering and then exposing it in a structured
way, which in this case wasn't the case, which wouldn't make the management
layer's job any easier in any way, since they'd have to parse it either way
(from libvirt or on their own). So, until this is resolved among vendors so
that we can apply some kind of device classification (no userspace DB),
management will have to simply read the description directly from sysfs.
As part of a private discussion, another interesting point has been raised -
virsh nodedev-list does support '--cap' option which filters only devices
matching the pattern. However, with SRIOV, NPIV, and MDEV we have nested
capabilities which are kept private and cannot be filtered by. That might be a
nice feature for users:
1) OK, let's see what MDEVs are there on the host
virsh nodedev-list --cap="mdev-<child|whatever>"
2) I'd like to create some on my own, so which physical devices do support MDEV?
virsh nodedev-list --cap='mdev-<parent|whatever>'
3) create the device on that physical device
The same goes for SRIOV, where we have virt_functions in parent and
phys_function in child and NPIV (I don't remember what it was here), I didn't
check in depth, but I think it should be possible for us to do and it's a valid
use case where users don't have to parse dumpxml's output for information about
the parent's nested capabilities.
Erik
Erik Skultety (10):
nodedev: Make use of the compile-time missing enum in switch error
conf: nodedev: Split virNodeDeviceDefFormat into more functions
nodedev: udevProcessPCI: Drop syspath variable
docs: Utilize our XSLT list generating template more
nodedev: conf: Split PCI sub-capability parsing to a separate method
nodedev: Introduce the mdev capability to the nodedev driver structure
nodedev: Introduce the mdev capability to a PCI parent device
nodedev: Introduce mdev capability for child devices
docs: Provide a nodedev driver stub documentation
docs: Document the mediated devices within the nodedev driver
docs/drivers.html.in | 6 +-
docs/drvnodedev.html.in | 344 +++++++++
docs/remote.html.in | 106 +--
docs/schemas/nodedev.rng | 41 ++
docs/storage.html.in | 62 +-
include/libvirt/libvirt-nodedev.h | 1 +
src/conf/node_device_conf.c | 812 +++++++++++++--------
src/conf/node_device_conf.h | 21 +-
src/conf/virnodedeviceobj.c | 3 +-
src/libvirt-nodedev.c | 1 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 1 +
src/node_device/node_device_udev.c | 242 +++++-
.../mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 8 +
tests/nodedevschemadata/pci_0000_02_10_7_mdev.xml | 27 +
tests/nodedevxml2xmltest.c | 1 +
tools/virsh-nodedev.c | 2 +
17 files changed, 1223 insertions(+), 456 deletions(-)
create mode 100644 docs/drvnodedev.html.in
create mode 100644 tests/nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml
create mode 100644 tests/nodedevschemadata/pci_0000_02_10_7_mdev.xml
--
2.12.2