Managing Network Virtualization and Network Resources in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Creating VF VNICs

To create a VF VNIC on a datalink, you need to enable the SR-IOV mode of a datalink. For more information, see Enabling the SR-IOV Mode of Datalinks. After you enable the SR-IOV mode of a datalink, VFs are automatically allocated to VNICs when you create VNICs by using the dladm create-vnic command. Similarly, VFs are automatically allocated to VLANs when you create VLANs by using the dladm create-vlan command.

You can also explicitly specify whether a VF needs to be allocated to a VNIC or a VLAN by specifying the iov VNIC link property with the dladm create-vnic or the dladm create-vlan commands.

You use the following command syntax to explicitly create a VF VNIC:

# dladm create-vnic [–p iov=value] -l link VNIC

When you are creating a VF VNIC, specifying the iov VNIC link property is optional. If you do not specify the iov VNIC link property, then the default value inherit is assigned to this property. You can specify the following values for the iov VNIC link property:

inherit

Default value of the iov VNIC link property. Determines whether a VF needs to be allocated based on the effective iov property value of the underlying datalink:

  • off – Does not allocate a VF for a VNIC.

  • on – Tries to allocate a VF for a VNIC. If not possible, a regular VNIC is created.

on

Allocates a VF. If a VF is not found, the creation of a VNIC fails.

off

Creates a VNIC without a VF.

The effective value of a datalink property is the value displayed under the EFFECTIVE column when you use the dladm show-linkprop command for a datalink.

The difference between the iov VNIC link property and other datalink properties is that you can specify the iov VNIC link property only when you are creating a VNIC or a VLAN. You cannot modify the iov VNIC link property after you create a VNIC or a VLAN.

The iov VNIC link property has an effective value that indicates whether a VF is allocated for the VNIC or VLAN. The value on under the EFFECTIVE column means that the VF is allocated and the value off under the EFFECTIVE column means that the VF is not allocated.

Example 2-24  Creating a VF VNIC

The following example shows how to create the VF VNIC vfvnic1 and the regular VNIC vnic1 on the datalink net0 by explicitly specifying the iov VNIC link property. This example assumes that you have enabled the SR-IOV mode of the datalink net0.

# dladm show-linkprop -p iov net0 
LINK     PROPERTY  PERM    VALUE  EFFECTIVE  DEFAULT   POSSIBLE 
net0     iov       rw      on     on         auto      auto,on,off
# dladm create-vnic -l net0 vfvnic1
# dladm show-linkprop -p iov vfvnic1
LINK      PROPERTY   PERM   VALUE    EFFECTIVE   DEFAULT    POSSIBLE
vfvnic1   iov        r-     inherit  on          inherit    inherit,on,off
# dladm create-vnic -p iov=off -l net0 vnic1
# dladm show-linkprop -p iov vnic1
LINK    PROPERTY   PERM   VALUE    EFFECTIVE   DEFAULT     POSSIBLE
vnic1   iov        r-     off      off         inherit     inherit,on,off

This example provides the following information:

  • You need to set the iov property for the datalink net0 to on before you create the VF VNICs.

  • If you do not specify a value for the iov property when creating a VNIC, then the default value inherit is assigned to the iov property. The VF VNIC vfvnic1 is created with a VF.

  • If you explicitly specify the value off for the iov property when creating a VNIC, a regular VNIC is created without a VF even though the iov property of the underlying datalink net0 is on. The VNIC vnic1 is created without a VF.