Named queues and forwarding classes

SR Linux provides support for both named queues and named forwarding classes.

By default, forwarding classes have system-reserved names, fc0 to fc7, that map to system-reserved unicast queues unicast-0 to unicast-7 and to multicast queues on applicable platforms.

SR Linux provides the flexibility to do the following:

  • assign each queue a string name and index value
  • assign each forwarding class a string name and index value
  • map the named forwarding class to a named queue

Implementation details

The following implementation details apply to named queues and forwarding classes:

  • Named queues and named forwarding classes are not automatically created under the /qos container configuration.
    Note: In case of upgrades from a previous release, the default forwarding classess (fc0 to fc7) are automatically created and mapped to the default queues since that configuration is mandatory for configuration of any QoS policy.
  • Even though they do not appear as named forwarding classes in the configuration, the default forwarding class names fc0 to fc7 always exist and are reserved names.
  • Even though they do not appear as named queues in the configuration, the default queue names unicast-0 to unicast-7 always exist and are reserved names. (On applicable platforms, default multicast queues are also reserved names.)
  • Every interface always has a full set of egress queues; only the names of the queues are variable.
  • If an interface has no explicit configuration for a default queue, and no named queue associated with that queue index, SR Linux displays the queue name in the output as the default value (unicast-0 to unicast-7) with default parameters.
  • If you configure a named forwarding class (for example, forwarding-class-A) and assign it a queue that references queue index 3, any subsequent configuration that references the default forwarding class name (in this case, fc3) fails. You must always reference the named forwarding class when it is configured.

Configuring named queues

Use the qos queues queue command to configure a name and index for a queue. When you configure a named queue, it remains an inactive configuration that cannot be referenced by any interface until you map it to a forwarding class.

Queues with a higher index are serviced more preferentially than queues with a lower index (subject to scheduler configuration).

Configure queue name

# info qos queues    
qos {
        queues {
            queue unicast-queue-1 {
                queue-index 0
            }
            queue multicast-queue-1 {
                queue-index 1
            }
        }
    }

Configuring forwarding class names and queue associations

Use the qos forwarding-classes forwarding-class <name> command to assign a name and output queue to a forwarding class.

You must associate the forwarding class with a unicast queue. All of the following parameters are mandatory: the forwarding-class name, and the unicast-queue.

Configure forwarding class name, and queue association

# info qos forwarding-classes
    qos {
        forwarding-classes {
            forwarding-class test-fc {
                output {
                    unicast-queue unicast-queue-1
                }
            }
        }
    }

You can reference the named forwarding class in policies including DSCP classifier and rewrite, dot1p classifier and rewrite, multifield classifier and rewrite, MPLS traffic-class and rewrite, and the ingress subinterface policer template.