|
NAMEpci_iov_schema ,
pci_iov_schema_alloc_node ,
pci_iov_schema_add_bool ,
pci_iov_schema_add_string ,
pci_iov_schema_add_uint8 ,
pci_iov_schema_add_uint16 ,
pci_iov_schema_add_uint32 ,
pci_iov_schema_add_uint64 ,
pci_iov_schema_add_unicast_mac —
PCI SR-IOV config schema interface
SYNOPSIS#include <machine/stdarg.h>
#include <sys/nv.h>
#include <sys/iov_schema.h>
nvlist_t *
void
void
void
void
void
void
void
DESCRIPTIONThe PCI Single-Root I/O Virtualization (SR-IOV) configuration schema is a data structure that describes the device-specific configuration parameters that a PF driver will accept when SR-IOV is enabled on the PF device. Each PF driver defines two schema instances: the PF schema and the VF schema. The PF schema describes configuration that applies to the PF device as a whole. The VF schema describes configuration that applies to an individual VF device. Different VF devices may have different configuration applied to them, as long as the configuration for each VF conforms to the VF schema.A PF driver builds a configuration schema by first allocating a schema node and then adding configuration parameter specifications to the schema. The configuration parameter specification consists of a name and a value type. Configuration parameter names are case-insensitive. It is an error to specify two or more configuration parameters with the same name. It is also an error to specific a configuration parameter that uses the same name as a configuration parameter used by the SR-IOV infrastructure. See iovctl.conf(5) for documentation of all configuration parameters used by the SR-IOV infrastructure. The parameter type constrains the possible values that the configuration parameter may take. A configuration parameter may be specified as a required parameter
by setting the Alternatively, a configuration parameter may be given a default
value by setting the The SR-IOV infrastructure guarantees that all configuration parameters that are either specified as required or given a default value will be present in the configuration passed to the PF driver. Configuration parameters that are neither specified as required nor given a default value are optional and may or may not be present in the configuration passed to the PF driver. It is highly recommended that a PF driver reserve the use of optional parameters for configuration that is truly optional. For example, a Network Interface PF device might have the option to encapsulate all traffic to and from a VF device in a vlan tag. The PF driver could expose that option as a "vlan" parameter accepting an integer argument specifying the vlan tag. In this case, it would be appropriate to set the "vlan" parameter as an optional parameter as it would be legitimate for a VF to be configured to have no vlan tagging enabled at all. Alternatively, if the PF device had an boolean option that controlled whether the VF was allowed to change its MAC address, it would not be appropriate to set this parameter as optional. The PF driver must either allow the MAC to change or not, so it would be more appropriate for the PF driver to document the default behaviour by specifying a default value in the schema (or potentially force the user to make the choice by setting the parameter to be required). Configuration parameters that have security implications must default to the most secure configuration possible. All device-specific configuration parameters must be documented in the manual page for the PF driver, or in a separate manual page that is cross-referenced from the main driver manual page. It is not necessary for a PF driver to check for failure from any of these functions. If an error occurs, it is flagged in the schema. The pci_iov_attach(9) function checks for this error and will fail to initialize SR-IOV on the PF device if an error is set in the schema. If this occurs, it is recommended that the PF driver still succeed in attaching and run with SR-IOV disabled on the device. The The The The The The The The RETURN VALUESThepci_iov_schema_alloc_node () function returns a
pointer to the allocated schema, or NULL if a failure occurs.
SEE ALSOpci(9), PCI_IOV_ADD_VF(9), PCI_IOV_INIT(9)AUTHORSThis manual page was written by Ryan Stone ⟨rstone@FreeBSD.org⟩.
Visit the GSP FreeBSD Man Page Interface. |