Writing Device Drivers for Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Device Configuration Parameters

The PF driver must support the configuration parameters listed in the following table. These parameters may be exported to the Sparc OVM Manager. Configuration is complete only when all the parameters are configured.

Table 21-1  Configuration Parameters Definition
Configuration Parameters
Definition
Example
Standards related configuration parameters
Number of VFs it can support

Note - Changes to the number of VFs require the PF device to detach and attach again.

max-config-vfs – Maximum number of VFs that can actually be configured. A PF driver can export this parameter when the maximum number of VFs that a PF driver supports is different from the capability indicated by the SR-IOV functionality.
Resource and device-specific parameters
Bandwidth, pools, and Q-pairs. Changes to these parameters can affect both PF and VF drivers.
The framework may not be aware of device-specific parameters and they may be known only to the PF driver. These parameters should be known before enabling the VFs so that a PF driver initializes its hardware appropriately
See igb(7D) and ixgbe(7D) to learn how to obtain the device specific parameters that are exported to the IOV framework.
  • pvid-exclusive – Indicates that a port-vlan-id and vlan-ids cannot be supported at the same time.

  • max-vf-mtu – Maximum MTU allowed for a VF.

  • max-vlans – Maximum number of vlan slots supported by the network class PF driver.

Class-specific parameters
Common properties based on the class of the device. For example, Ethernet devices may have properties such as MAC addresses, VLAN-Ids, Port-VLAN-ID, bandwidth and so on.
Class specific configuration is expected to be used and may define the behavior of each of the parameters.
None

Note - When device configuration parameters are changed, the devices should be reattached.

Note - Configure the parameters in the following order before enabling the VFs. Class specific parameters will be based on the class specific configurator.
  1. Standards–related parameters

  2. Resource and device–specific parameters

  3. Class–specific parameters


pci.conf File

The PCI configuration information file, /etc/pci.conf enables the system to save PCI configurations such as the number of VFs of a particular PF. The pci.conf file provides the following:

  • - To persist the PCI configuration so that VFs can be created automatically upon booting of the system.

  • - Since the configuration file is part of the boot_archive, VFs can be used during the booting of the system.


Note - Add the /etc/pci.conf to the /boot/solaris/filelist.ramdisk file in order to include the /etc/pci.conf file into the Oracle Solaris boot process.

See Appendix E, pci.conf File for more information.

Setting Device Configuration Parameters

  • Sparc: The parameters can be set through the ldm command. See the ldm (1M) man page for details.

  • x86: The class–specific parameters can be specified by the pci.conf file. The following example shows the parameters set in a pci.conf file.

Example 21-1  Setting Device Configuration Parameters
[System_Configuration]
[[path=/pci@0,0/pci8086,3a40@1c/pci108e,4848@0,1]]
num-vf=2

[Device_Configuration]
[[path=/pci@0,0/pci8086,3a40@1c/pci108e,4848@0,1]]
VF[0] = {
		primary-mac-addr = 0xaabbccddeeff
		alt-mac-addrs = 0x102233445556, 0x102233445557
		vlan-id = 20, 30
}

VF[1] = {
		primary-mac-addr = 0xaabbccddeef1
		alt-mac-addrs = 0x102233445568
		vlan-id = 20, 30, 40, 50
} 

SR-IOV Configuration on Sparc OVM Platform

The Sparc OVM Manager is responsible for the SR-IOV configuration on all Sparc OVM platforms. The Sparc OVM Manager is responsible for the following operations:

  • Obtain a list of PFs that have SR-IOV capable drivers

  • Obtain the device specific parameters supported by the drivers

  • Validate a specific device configuration

  • Update the Machine Descriptor (MD) file with all valid configuration details along with the assignment and removal of VFs

The following figure shows a high-level view of the Sparc OVM configuration.

Figure 21-2  High-Level View of Sparc OVM Configuration

image:The figure shows a high-level view of the Sparc OVM Configuration

SR-IOV Configuration on Bare Metal Platforms

At the time of Oracle Solaris 11 release, no configuration tool is available to configure SR-IOV on bare metal platforms, including x86.