Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Use Case: Offloading Hardware SLAs to a NIC

Objective - This use case shows how to configure two kernel zones with VF VNICs and offload the SLAs of the VF VNICs to the underlying physical NIC.

Typically, you cannot set SLA properties such as max-bw and priority on the VF VNIC because the VF VNIC bypasses the global zone. However, you can offload the SLA implementation to the NIC if it is supported by the NIC. The Intel XL710 10/40 Gigabit Ethernet controller NIC supports the offloading of SLAs and supports bandwidth shares in addition to the max-bw property. For information about bandwidth shares, see Bandwidth Share for VNICs.

The following figure shows the Oracle Solaris system setup used in this use case.

Figure 7  Use Case: Kernel Zones With SR-IOV VF VNICs

image:Graphic shows kernel zones with SR-IOV VF VNICs.

The setup is as follows:

  • An Oracle Solaris system with a global zone.

  • The datalink net4, which is configured over the Intel XL710 10/40 Gigabit Ethernet controller NIC with 10 Gbps bandwidth.

  • Two kernel zones: gold-zone and bronze-zone.

  • gold-zone is assigned a bandwidth share of 80% (bw-share=80). The kernel zone bronze-zone is assigned a bandwidth share of 20% (bw-share=20) and maximum bandwidth of 4 Gbps (maxbw=4G).

How to Offload Hardware SLAs to a NIC (Use Case)

You need to perform the following steps to offload the SLA properties to the NIC:

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. Set the iov property for the datalink net4 to on before you create the VF VNICs.
    $ dladm set-linkprop -p iov=on net4
  2. Check whether the datalink net4 supports the bw-share property.
    $ dladm show-linkprop -H -p bw-share net4
    LINK     PROPERTY        MODE HWPOSSIBLE    HWFLAGS SWPOSSIBLE SWFLAGS
    net4     bw-share         none 1-100         --      --         -- 

    The output shows that the physical datalink net4 supports the bw-share property because the value 1-100 is displayed under the column HWPOSSIBLE.

  3. Create a VF VNIC for gold-zone and set the bandwidth share to 80.
    $ zonecfg -z gold-zone
    zonecfg:gold-zone> add anet
    zonecfg:gold-zone:anet> set lower-link=net4
    zonecfg:gold-zone:anet> set iov=on
    zonecfg:gold-zone:anet> set bw-share=80
    zonecfg:gold-zone:anet> end
    zonecfg:gold-zone> verify
    zonecfg:gold-zone> commit
    zonecfg:gold-zone> exit
  4. Create a VF VNIC for bronze-zone and set the bandwidth share to 20 and the maximum bandwidth to 4G.
    $ zonecfg -z bronze-zone
    zonecfg:bronze-zone> add anet
    zonecfg:bronze-zone:anet> set lower-link=net4
    zonecfg:bronze-zone:anet> set iov=on
    zonecfg:bronze-zone:anet> set bw-share=20
    zonecfg:bronze-zone:anet> set maxbw=4G
    zonecfg:bronze-zone:anet> end
    zonecfg:bronze-zone> verify
    zonecfg:bronze-zone> commit
    zonecfg:bronze-zone> exit
  5. Boot the kernel zones.
    $ zoneadm -z gold-zone boot
    $ zoneadm -z bronze-zone boot
  6. Check the bandwidth share of the VF VNICs.
    $ dladm show-linkprop -p bw-share  
    LINK             PROPERTY    PERM  VALUE     EFFECTIVE    DEFAULT   POSSIBLE
    gold-zone/net1   bw-share     rw    80        80%          --        1-100 
    bronze-zone/net1 bw-share     rw    20        20%          --        1-100 

    Note -  In this use case, the total bandwidth share is kept at 100. A relative share is assigned to the VF VNICs if the total bandwidth share exceeds 100. For more information, see the dladm(8) man page.
  7. Check the maximum bandwidth allocated to the VF VNICs.
    $ dladm show-linkprop -p max-bw
    LINK              PROPERTY   PERM  VALUE      EFFECTIVE    DEFAULT   POSSIBLE
    gold-zone/net1    max-bw     rw    --         --           --        -- 
    bronze-zone/net1  max-bw     rw    4000       4000         --        --