If a NIC supports hardware SLAs that enable you to set SLA properties for VF VNICs, the SLA implementation is offloaded to the NIC automatically by the system. This behaviour helps you to save CPU cycles.
You can use the dladm show-linkprop command with the –H option to check the capabilities of the underlying datalink. The command syntax is:
$ dladm show-linkprop -H -p prop link
where prop refers to the SLA properties such as max-bw, priority, and bw-share.
The output displays the following columns:
Displays a value if there is hardware support for the property. The physical NIC does not support the property if the value is displayed as --.
Displays a value if there is software support in the networking stack for the property. The datalink does not support the property if the value is displayed as --.
Displays the current mode that is used for the datalink to implement the property. The possible values are sw for software only, hw for hardware only, and none for no support. Note that MODE can be none even though there is hardware or software support.
Displays o for outbound, i for inbound, and oi for outbound and inbound. Currently, these flags are displayed for the SLA properties max-bw, bw-share, and priority.
If the datalink supports hardware SLAs, you can set the hardware SLA properties on the datalink by using the following command:
$ dladm set-linkprop -p prop=value link
where prop refers to the SLA properties such as max-bw, priority, and bw-share.
Example 31 Displaying the Hardware and Software Capabilities of DatalinksThe following example shows the output of the max-bw property for the VF VNIC z1/net1 that is configured over the Intel XL710 10/40 Gigabit Ethernet controller NIC. The output shows that there is both hardware and software support because values are displayed under the columns HWPOSSIBLE and SWPOSSIBLE.
$ dladm show-linkprop -H -p max-bw z1/net1 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS z1/net1 max-bw hw 50-40000:50 o 0-40000:0.001 oi
The following example shows the output of the max-bw property for the VF VNIC z2/net2 that is configured over the Niantic NIC. The output shows that there is only software support for the VF VNIC z2/net2 because values are displayed under the column SWPOSSIBLE.
$ dladm show-linkprop -H -p max-bw z2/net2 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS z2/net2 max-bw none -- 0-10000:0.001 oi
The following example shows the output of the bw-share property for the VF VNIC z1/net1 that is configured over the Intel XL710 10/40 Gigabit Ethernet controller NIC. For information about the bw-share property, see Bandwidth Share for VNICsThe output shows that there is only hardware support for the VF VNIC z1/net1 for the bw-share property. The values are displayed under the column HWPOSSIBLE.
$ dladm show-linkprop -H -p bw-share z1/net1 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS z1/net1 bw-share hw 1-100 o --
The following example shows the output of the bw-share property for the VF VNIC z2/net2 that is configured over the Niantic NIC. The output shows that there is no support for the VF VNIC z2/net2 for the bw-share property. The values are not displayed under the columns HWPOSSIBLE and SWPOSSIBLE.
$ dladm show-linkprop -H -p bw-share z2/net2 LINK PROPERTY MODE HWPOSSIBLE HWFLAGS SWPOSSIBLE SWFLAGS z2/net2 bw-share none -- --Example 32 Setting Maximum Bandwidth for a VF VNIC
The following example shows how to set the max-bw property for the VF VNIC z1/net21.
$ dladm set-linkprop -p max-bw=20 -t z1/net21 $ dladm show-linkprop -p max-bw z1/net21 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE z1/net21 max-bw rw 20 50 -- --
In certain cases, the effective value for the max-bw property can be different from the set value for the VF VNIC that is configured over a hardware SLA capable link as shown in this example.