SR-IOV Patch Series 5/7: SR-IOV Configuration Interface
Ryan Stone
rysto32 at gmail.com
Tue May 27 02:14:19 UTC 2014
This patch series deals with the configuration schema, which specifies
the format of valid configuration for a given PF device, and the
details of accepting configuration from iovctl, validating it against
the schema and then passing it to the driver.
http://people.freebsd.org/~rstone/patches/iov/0011-Add-infrastructure-for-exporting-config-schema-from-.patch
[PATCH 11/21] Add infrastructure for exporting config schema from PF
drivers
---
sys/conf/files | 1 +
sys/dev/pci/pci_if.m | 6 ++
sys/dev/pci/pci_iov.c | 186 ++++++++++++++++++++++++++++++++++++-
sys/dev/pci/pci_iov_private.h | 1 +
sys/dev/pci/pci_iov_schema.c | 208 ++++++++++++++++++++++++++++++++++++++++++
sys/dev/pci/pci_private.h | 3 +-
sys/dev/pci/pcivar.h | 7 +-
sys/dev/pci/schema_private.h | 35 +++++++
sys/sys/iov.h | 127 ++++++++++++++++++++++++++
sys/sys/iov_schema.h | 52 +++++++++++
10 files changed, 622 insertions(+), 4 deletions(-)
http://people.freebsd.org/~rstone/patches/iov/0012-Add-function-to-validate-the-consistency-of-SR-IOV-c.patch
[PATCH 12/21] Add function to validate the consistency of SR-IOV
config
Add a function that validates that the user-provided SR-IOV
configuration is valid. This includes basic checks that the
structure of the configuration is correct (e.g. all required
configuration nodes are present) as well as validating against
a configuration schema.
The schema validation consists of:
- Ensuring that all required config parameters are present.
- If the schema defines a default value for a parameter,
adding the default value if the parameter is not set.
- Ensuring that no parameters are specified in the config
that are not defined in the schema.
- Ensuring that have the correct type defined in the schema.
- Ensuring that no configuration nodes are present for devices
that do not exist. For example, if 2 VFs are configured,
then we validate that a node called VF-5 does not exist.
---
sys/dev/pci/pci_iov_schema.c | 428 ++++++++++++++++++++++++++++++++++++++++---
sys/sys/iov.h | 5 +
2 files changed, 412 insertions(+), 21 deletions(-)
http://people.freebsd.org/~rstone/patches/iov/0013-Pass-SR-IOV-configuration-to-kernel-using-an-nvlist.patch
[PATCH 13/21] Pass SR-IOV configuration to kernel using an nvlist
Pass all SR-IOV configuration to the kernel using an nvlist. The
main benefit that this offers is flexibility. It allows a driver
to accept any number of parameters of any type supported by the
SR-IOV configuration infrastructure with having to make any
changes outside of the driver.
It also offers the user very fine-grained control over the
configuration of the VFs -- if they want, they can have different
configuration applied to every VF.
---
sys/dev/pci/pci_if.m | 2 +
sys/dev/pci/pci_iov.c | 129 +++++++++++++++++++++++++++++++++++++++++---------
sys/sys/iov.h | 93 +++++++++++++++++++++++++++++++++---
3 files changed, 195 insertions(+), 29 deletions(-)
http://people.freebsd.org/~rstone/patches/iov/0021-Validate-the-schema-that-the-PF-driver-passed-to-us.patch
[PATCH 21/21] Validate the schema that the PF driver passed to us
---
sys/dev/pci/pci_iov.c | 4 +
sys/dev/pci/pci_iov_schema.c | 275 +++++++++++++++++++++++++++++++++++++++++--
sys/dev/pci/schema_private.h | 2 +
3 files changed, 274 insertions(+), 7 deletions(-)
More information about the freebsd-hackers
mailing list