Time Aware Shaper (TAS)

1. Introduction

Time Aware Shaping (TAS) is implementing the Enhancement for scheduled traffic, as described in IEEE 802.1Q section 8.6.8.4 and 8.6.9. It can be used for scheduling transmission per queue relative to a known timescale. This can be configured per port.

As illustrated below:
A Gate Control List is a list of entries containing Gate Operations per Class.
Each entry is applying Gate Operations in a defined time interval (I0 - I3) and set the gate state for each Class to either Open or Closed.
The Gate Control List is executed in a cyclic manner and is started at a defined point in time.

                            Gate Control List

Queue   Queue      Queue     +-----------+
Class 7 Class 6    Class 0   |I0 OOOCCCCC|
+---+   +---+      +---+     +-----------+
+---+   +---+ ---- +---+     |I1 COOCOOOC|
+---+   +---+      +---+     +-----------+
+---+   +---+      +---+     |I2 CCCOOOCO|
+---+   +---+      +---+     +-----------+
+-+-+   +-+-+      +-+-+     |I3 OCOOOOOO|
  |       |          |       +-----+-----+
+-+--+  +-+--+     +-+--+          |
|Gate|  |Gate|     |Gate|          |
| O  +--+ C  +-----+ O  <----------+
+----+  +----+     +----+

The TAS functionality can be enabled or disabled.
When enabled it can be configured through the 'Administrative' parameters.
When all 'Administrative' parameters are configured, it can become a 'Pending' configuration by setting the 'config-change' parameter to 'True'. A pending configuration becomes 'Operational' when the 'Current Time' (PTP TOD) becomes equal to the configured 'Administrative' parameter 'Base Time'.

2. The full Gate Parameter Table

This show a get of the full Gate Parameter Table.

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table"
  : queue-max-sdu-table:
    - traffic-class: 0
    - traffic-class: 1
    - traffic-class: 2
    - traffic-class: 3
    - traffic-class: 4
    - traffic-class: 5
    - traffic-class: 6
    - traffic-class: 7
    oper-gate-states: 255
    admin-control-list:
      gate-control-entry: []
    oper-control-list:
      gate-control-entry: []
    admin-cycle-time:
      numerator: 0
      denominator: 1
    oper-cycle-time:
      numerator: 0
      denominator: 1
    admin-cycle-time-extension: 256
    oper-cycle-time-extension: 256
    admin-base-time:
      seconds: '0'
      nanoseconds: 0
    oper-base-time:
      seconds: '0'
      nanoseconds: 0
    config-change: false
    config-change-time:
      seconds: '0'
      nanoseconds: 0
    tick-granularity: 30
    current-time:
      seconds: '11'
      nanoseconds: 369956254
    config-pending: false
    config-change-error: '0'
    supported-list-max: 8
    supported-cycle-max:
      numerator: 1000000000
      denominator: 1000000001
    supported-interval-max: 4294967295

3. Gate Enable

This will show how to set the Gate Enable to true.

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/gate-enabled"
  : true

Check that the Gate Enable is actually True.

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table/gate-enabled"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/gate-enabled"
  : true

4. Maximum SDU size

The Maximum SDU size is controlling the maximum size of frames that are allowed to be forwarded. It also determines the Guard Band time, the transmission is stopped before end of a Gate Control List interval.

Configure the Maximum SDU size for traffic class 0-3-7 to 128-256-512 Bytes:

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/\
     queue-max-sdu-table[traffic-class='0']/queue-max-sdu"
  : 128
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/\
     queue-max-sdu-table[traffic-class='3']/queue-max-sdu"
  : 256
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/\
     queue-max-sdu-table[traffic-class='7']/queue-max-sdu"
  : 512

Get the Maximum SDU size for all traffic class: Note that the value '0' interpreted as the max SDU size supported by the underlying MAC.

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table/queue-max-sdu-table"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/queue-max-sdu-table"
  : - traffic-class: 0
      queue-max-sdu: 128
    - traffic-class: 1
      queue-max-sdu: 0
    - traffic-class: 2
      queue-max-sdu: 0
    - traffic-class: 3
      queue-max-sdu: 256
    - traffic-class: 4
      queue-max-sdu: 0
    - traffic-class: 5
      queue-max-sdu: 0
    - traffic-class: 6
      queue-max-sdu: 0
    - traffic-class: 7
      queue-max-sdu: 512

5. Administrative Gate Control List

The Administrative Gate Control List is the Control List that can be operational after Config Change set to true.

Related to this is: The Administrative Base Time
The Administrative Cycle Time
The Administrative Cycle Time Extension
The Administrative Gate States

5.1. Gate Control List

Configure the Administrative Gate Control List to have three entries:
Index 1: Open traffic-class 0 in 10 ms Index 2: Open traffic-class 3 in 40 ms Index 3: Open traffic-class 7 in 90 ms

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-control-list/\
     gate-control-entry"
  : index: 1
    operation-name: ieee802-dot1q-sched:set-gate-states
    time-interval-value: 10000000
    gate-states-value: 1
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-control-list/\
     gate-control-entry"
  : index: 2
    operation-name: ieee802-dot1q-sched:set-gate-states
    time-interval-value: 40000000
    gate-states-value: 8
- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-control-list/\
     gate-control-entry"
  : index: 3
    operation-name: ieee802-dot1q-sched:set-gate-states
    time-interval-value: 90000000
    gate-states-value: 128

5.2. Base Time

The point in time where the pending Control List becomes Operational.

Configure the Administrative Base Time to start the list in 20 sec 0 nsec:

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-base-time/\
     seconds"
  : '20'

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-base-time/\
     nanoseconds"
  : 0

5.3. Cycle Time

The length in time of the Control List.
Note that this has to be at least the sum of the time interval in the Control List.

Configure the Administrative Cycle Time to 140 ms:

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-cycle-time/\
     numerator"
  : 140000000

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-cycle-time/\
     denominator"
  : 1000000000

5.4. Cycle Time Extension

This is the time the running Control List can be extended when a new Control List becomes operational.
If the Base Time of the new Control List is configured so it cannot be within this time, the running list will be truncated.

Configure the Administrative Cycle Time extension to 10 ms:

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/\
     admin-cycle-time-extension"
  : 10000000

5.5. Gate States

This is the Gate State for all traffic classes that is configured when no Control List is active.

Configure the Administrative Gate States to:

Open   traffic-class 0
Closed traffic-class 1
Closed traffic-class 2
Open   traffic-class 3
Closed traffic-class 4
Closed traffic-class 5
Closed traffic-class 6
Open   traffic-class 7

The least sinificat bit is traffic-class 0.
This is represented by the hexadecimal value 0x85 and the same as decimal 133.

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/admin-gate-states"
  : 133

The Administrative Gate Control List is the Control List that can be operational after Config Change set to true.

Related to this is: The Administrative Base Time
The Administrative Cycle Time
The Administrative Cycle Time Extension
The Administrative Gate States

6. Config Change

To make a new Control List running the following has to be done.

Set the Gate Enabled to enable the TAS functionality:
- gate-enabled

Configuration of required Control List information in the Gate Parameter Table:
Let the admin-base-time be in the future.

- queue-max-sdu-table
- admin-gate-states
- admin-control-list
- admin-cycle-time
- admin-cycle-time-extension
- admin-base-time

Set the Config-Change to move the Control List to Pending state awaiting the Base Time to occur:
- config-change

iPATCH request message:

- ? "/ietf-interfaces:interfaces/interface[name='1']/\
     ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/config-change"
  : true

Read back the status information showing that the Control List is pending:
- config-pending

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table/config-pending"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/config-pending"
  : true

Read back the status information showing what time the pending Control List becomes operational:
- config-change-time

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table/config-change-time"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table/config-change-time"
  : seconds: '20'
    nanoseconds: 0

After the Config Change Time occur, read back the Gate Parameter Table to see the new Operational Control List information.

Observe that the Config Pending has cleared.

7. Operational Gate Control List

When a Control List becomes operational the Operational Gate Control List information is available in the Gate Parameter Table.

Related to this is:
The Operational Base Time
The Operational Cycle Time
The Operational Cycle Time Extension
The Operational Gate States

All leafs containing Operational information is named starting with 'oper-'.

This show a get of the full Gate Parameter Table.

FETCH request message:

- "/ietf-interfaces:interfaces/interface[name='1']/\
   ieee802-dot1q-bridge:bridge-port/\
   ieee802-dot1q-sched-bridge:gate-parameter-table"

FETCH response message:

- ? "/ietf-interfaces:interfaces/interface/ieee802-dot1q-bridge:bridge-port/\
     ieee802-dot1q-sched-bridge:gate-parameter-table"
  : queue-max-sdu-table:
    - traffic-class: 0
      queue-max-sdu: 128
    - traffic-class: 1
    - traffic-class: 2
    - traffic-class: 3
      queue-max-sdu: 256
    - traffic-class: 4
    - traffic-class: 5
    - traffic-class: 6
    - traffic-class: 7
      queue-max-sdu: 512
    gate-enabled: true
    admin-gate-states: 133
    oper-gate-states: 128
    admin-control-list:
      gate-control-entry:
      - index: 1
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 10000000
        gate-states-value: 1
      - index: 2
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 40000000
        gate-states-value: 8
      - index: 3
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 90000000
        gate-states-value: 128
    oper-control-list:
      gate-control-entry:
      - index: 1
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 10000000
        gate-states-value: 1
      - index: 2
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 40000000
        gate-states-value: 8
      - index: 3
        operation-name: ieee802-dot1q-sched:set-gate-states
        time-interval-value: 90000000
        gate-states-value: 128
    admin-cycle-time:
      numerator: 140000000
      denominator: 1000000000
    oper-cycle-time:
      numerator: 140000000
      denominator: 1000000000
    admin-cycle-time-extension: 10000000
    oper-cycle-time-extension: 10000000
    admin-base-time:
      seconds: '20'
      nanoseconds: 0
    oper-base-time:
      seconds: '20'
      nanoseconds: 0
    config-change: true
    config-change-time:
      seconds: '20'
      nanoseconds: 0
    tick-granularity: 30
    current-time:
      seconds: '23'
      nanoseconds: 835093398
    config-pending: false
    config-change-error: '0'
    supported-list-max: 8
    supported-cycle-max:
      numerator: 1000000000
      denominator: 1000000001
    supported-interval-max: 4294967295