NIC Queue Configuration

Overview

NIC channels (queues) can be configured per interface on systems with multiple network interfaces. By default, the number of NIC queues is configured automatically on a system as follows:

  • Platform interfaces (oam, management/admin, cluster-host)

    The number of queues is configured to match the number of platform CPUs.

  • SRIOV interfaces

    • The number of PF queues is configured to match the number of application CPUs.

    • The number of VF queues is determined by the driver. The number allocated to each VF can vary based on how many VFs are configured on the PF.

Interface API and Command Line Interface Considerations

The following attributes are available on the interface resource for configuring NIC channels.

Attribute

Type

Description

channels

Integer or null

Number of NIC channels (queues) for SR-IOV PF. Applicable to iftype: ethernet or iftype: ae. Must be ≥ 1 and ≤ port’s maxchannels. null = system defaults. Modifiable at runtime without host lock.

sriov_vf_channels

Integer or null

Number of SR-IOV VF channels (queues). Applicable to ifclass: pci-sriov with sriov_vf_driver: netdevice, or iftype: vf. Must be ≥ 1 and ≤ port’s sriov_vf_maxchannels. null = system defaults. Modifiable at runtime without host lock.

These attributes appear in:

API Operation

System Command

List interfaces

system host-if-list <host> — channels and sriov_vf_channels shown in the Attribute column when non-null

Show interface

system host-if-show <host> <interface> — channels and sriov_vf_channels displayed as dedicated fields

Create interface

system host-if-add <host> <ifname> <iftype> ... --channels <N> --vf-channels <N>

Modify interface

system host-if-modify <host> <interface> --channels <N> or --vf-channels <N>

Reset to defaults

system host-if-modify <host> <interface> --channels none or --vf-channels none (also accepts default)

Port API and Command Line Interface Considerations

The following read-only attributes are present on the port resource:

Attribute

Type

Description

numchannels

Integer

Current number of combined channels configured on the physical port.

maxchannels

Integer

Maximum combined channels supported by hardware (upper bound for interface channels).

sriov_vf_numchannels

Integer

Current number of channels on each SR-IOV VF.

sriov_vf_maxchannels

Integer

Maximum channels per VF (upper bound for interface sriov_vf_channels).

These attributes appear in:

API Operation

System Command

Show port

system host-port-show <host> <port> — all four fields displayed

Relationship Between Port and Interface Fields

The following table describes how port attributes map to their corresponding interface attributes.

Port

Interface

maxchannels

channels must be ≤ this value

numchannels

actual applied value

sriov_vf_maxchannels

sriov_vf_channels must be ≤ this value

sriov_vf_numchannels

actual applied value

NIC Channel Configuration Validation Rules

The following validation rules are enforced server-side:

  • channels cannot be set on VLAN interfaces or iftype: vf.

  • sriov_vf_channels requires ifclass: pci-sriov with sriov_vf_driver: netdevice, or iftype: vf.

  • Values must be ≥ 1.

  • Values cannot exceed the corresponding port maximum.

  • Changes are applied at runtime (no host lock/unlock required).

  • Setting none or default resets to system-calculated defaults (platform CPUs for platform interfaces, application CPUs for SR-IOV PFs).

Configure NIC Channels on an Interface

To configure NIC channels on an interface, perform the following steps:

Procedure

  1. Check the current and maximum channels allowed on the port.

    ~(keystone_admin)]$ system host-port-show <host> <port>
    
  2. Set the number of channels for a platform classed interface.

    ~(keystone_admin)]$ system host-if-modify <host> <interface> --channels <N>
    
  3. Set the number of channels for the PF and optionally for the associated VFs, for a pci-sriov classed interface.

    ~(keystone_admin)]$ system host-if-modify <host> <interface> --channels <N>
    ~(keystone_admin)]$ system host-if-modify <host> <interface> --vf-channels <N>
    
  4. Wait for the runtime manifest to perform the configuration, then check the values again.