Configure VF Interfaces Rate Limiting Using the CLIΒΆ

You can apply rate-limiting on VFs used for Data networks.

About this task

This feature is available on the Intel X710/XL710 (Fortville) 10G and Intel E810-CQDA2 (Columbiaville). It can be used on sub-interfaces of vf type interfaces.

Be aware of the following guidance when using this feature:

  • Rate limiting is applicable to the maximum transmission rate.

  • Rate limiting is disabled by default.

  • If all VFs are in contention then each will get an equal share of the bandwidth.

  • The total sum of the maximum transmission rates of all rate limited VFs cannot exceed 90% of the port link speed.

  • The units are Mbps, and value of 0 means turn off the rate limiting.

  • VFs with different limited rate are supposed to be attached to separate data networks and managed by Kubernetes SR-IOV device plugin as different ResourcePools. You can then use the VFs by specifying the corresponding <resourceName>.

This task must be performed from the CLI.

Prerequisites

You must create an SR-IOV interface before you can provision VF interface. For more information, see Provisioning SR-IOV Interfaces using the CLI.

Data networks should be created for VF sub-interfaces attachment.

PHYSNET1='physnet_kernel_400m'
PHYSNET2='physnet_dpdk_600m'
system datanetwork-add ${PHYSNET1} vlan
system datanetwork-add ${PHYSNET2} vlan

Procedure

  1. Lock the host.

    Note

    AIO-SX hosts do not need to be locked to provision an SR-IOV interface and assign it to a data network.

    ~(keystone_admin)$ system host-lock controller-0
    
  2. Create a sub-interface with rate limiting configuration.

    The parameters are all the same as shown in the procedure for StarlingX Node Configuration and Management: Provisioning SR-IOV VF Interfaces using the CLI, plus one newly added rate limiting related parameter: --max-tx-rate.

    Note

    The units for max-tx-rate are Mbps. The configured sriov_numvfs with max_tx_rate(max_tx_rate*sriov_numvfs) should not exceed 90% of the link bandwidth.

    For example:

    ~(keystone_admin)$ system host-if-add -c pci-sriov controller-0 sriov00 vf sriov0 -N 2 --vf-driver=netdevice --max-tx-rate=400
    ~(keystone_admin)$ system host-if-add -c pci-sriov controller-0 sriov01 vf sriov0 -N 2 --vf-driver=vfio --max-tx-rate=600
    
  3. The rate limit configuration can be modified by specifying other values.

    Note

    The units for max-tx-rate are Mbps.

    ~(keystone_admin)$ system host-if-modify controller-0 sriov00 --max-tx-rate=200
    
  4. The rate limit configuration can be modified by specifying a value of zero.

    Note

    Setting max-tx-rate to 0 disables any rate limiting.

    ~(keystone_admin)$ system host-if-modify controller-0 sriov00 --max-tx-rate=0
    
  5. Attach the vf interfaces to the data.

    ~(keystone_admin)$ system interface-datanetwork-assign controller-0 sriov00 $PHYSNET1
    ~(keystone_admin)$ system interface-datanetwork-assign controller-0 sriov01 $PHYSNET2
    
  6. Unlock the host.

    Note

    AIO-SX hosts do not need to be locked to provision an SR-IOV interface and assign it to a data network.

    ~(keystone_admin)$ system host-unlock controller-0