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.
  • 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.

Output queue mapping

By default, forwarding classes haved fixed system-reserved names, fc0 to fc7, that map to system-reserved queues. Each unicast queue and each multicast queue of an egress port is associated with a scheduler node. The mapping of queues to scheduler nodes is platform-dependent.

7250 IXR

On 7250 IXR systems, there are two scheduling nodes per port: one for unicast traffic and one for multicast traffic. The two scheduling nodes have a weighted round robin (WRR) relationship, but the parameters cannot be adjusted. There is one PIR scheduling loop per scheduling node. The scheduling loop serves the strict priority classes first (in descending order of FC), followed by the WRR classes (by weight), limiting each forwarding class to its PIR (expressed as a percentage of the egress port bandwidth). By default, the PIR of each forwarding class is 100%.
Note: Multicast traffic handled by the multicast scheduler node is unscheduled and is not subject to the ingress VOQ buffering that applies to unicast traffic.

7220 IXR-D2/D2L/D3/D3L

On 7220 IXR-D2/D2L and D3/D3L systems, the unicast queue and multicast queue for a particular forwarding class make up a queue pair. Each of the eight possible queue pairs of an egress port are associated with a scheduler node. Each scheduler node is served as strict priority (SP) or WRR. If it is served as WRR, the scheduler node also has an associated weight. The scheduling loop serves the SP nodes first, followed by the WRR nodes by weight. The serving order of SP queues is in descending order of FC: fc7 first, then fc6, then fc5, and so on.

7220 IXR-H2/H3/H4/D4/D5

On 7220 IXR-H2, H3, and H4 and 7220 IXR-D4/D5 systems, there is a one-to-one mapping of queues to scheduler nodes. Each scheduler node can be served as SP or WRR. A WRR node has a configurable weight. The scheduling loop serves the SP nodes first, followed by the WRR nodes by weight. The serving order of SP queues is as follows:

  • unicast queue 7 serving forwarding class index 7

  • unicast queue 6 serving forwarding class index 6

  • multicast queue 3 serving forwarding class index 6 and 7

  • unicast queue 5 serving forwarding class index 5

  • unicast queue 4 serving forwarding class index 4

  • multicast queue 2 serving forwarding class index 4 and 5

  • unicast queue 3 serving forwarding class index 3

  • unicast queue 2 serving forwarding class index 2

  • multicast queue 1 serving forwarding class index 2 and 3

  • unicast queue 1 serving forwarding class index 1

  • unicast queue 0 serving forwarding class index 0

  • multicast queue 0 serving forwarding class index 0 and 1

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.