Named queues and forwarding classes

On 7250 IXR systems, SR Linux provides support for both named queues and named forwarding classes.

In R22.6 and earlier, forwarding classes had fixed names, fc0 to fc7, and each queue of an egress port was distinguished by a simple numerical index 0 to 7 that mapped directly to those forwarding classes.

To align with OpenConfig, SR Linux R22.11 and later provides the flexibility to do the following:

  • Assign each queue a string name
  • Assign each forwarding class a string name and forwarding class index
  • Map the named forwarding class to the named queue
Note: There are no changes to the factory default configuration.

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.
  • 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.
  • When a named queue is associated with a forwarding class, the queue index value is determined by the forwarding-class-index value defined in the forwarding class configuration. The specified queue name then serves as an alias for the associated unicast or multicast queue index. For example, if queue-X is mapped to forwarding-class-index 5 as a unicast output queue, then queue-X serves as the alias for queue unicast-5.
  • 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 forwarding class index (for example, forwarding-class-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 queue names

On 7250 IXR systems, use the qos queues queue <name> command to assign a name to 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. The index value for the named queue is derived from the forwarding class mapping (based on the forwarding class index).

Configure queue name (7250 IXR only)

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

Configuring forwarding class names and queue associations

On 7250 IXR systems, use the qos forwarding-classes forwarding-class <name> command to assign a name, index value, and output queue to a forwarding class.

Forwarding classes with a higher forwarding class index are generally serviced more preferentially than forwarding classes with a lower forwarding class index (subject to scheduler configuration).

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

Configure forwarding class name, index, and queue association (7250 IXR only)

# info qos forwarding-classes
    qos {
        forwarding-classes {
            forwarding-class test-fc {
                forwarding-class-index 1
                output {
                    unicast-queue unicast-queue-1
                    multicast-queue multicast-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.