Automated Configuration Framework for TSN
Time-Sensitive Networking (TSN) is a set of IEEE standards designed to ensure real-time guarantees for data communication over switched Ethernet. The TSN standards offer a wide range of features, including various traffic shaping mechanisms, precise clock synchronization, and network management. A key challenge arising from this wide array of features is determining how to effectively combine and evaluate them in a specific use case to maximize their benefits. It is rather difficult to understand the impact of each feature on the overall performance and timeliness of the system when features are combined together.
To address this challenge, several simulation tools are available, such as NeSTiNg, an open-source tool based on OMNeT++. However, these tools require significant effort to configure a network properly. This can be also a source of errors in the configuration, thus in the desired results that one would expect.
To streamline the configuration process and reduce potential errors, we developed an Automated TSN Configuration plugin on top of OMNeT++. This user-friendly interface simplifies network setup, saving time and effort while ensuring more accurate evaluations. The plugin is available on GitLab.
TSN traffic shapers
TSN standards provide several features including various traffic shapers to support predictability and to prevent starvation of low-priority traffic transmission on switched Ethernet. Among those, Time-Aware Shaper (TAS) is a mechanism to provide low-jitter communication. Each Ethernet switch port contains maximum of eight FIFO queues and a strict priority selector defines which queue can transmit its pending buffered frames. TAS operates by isolating the queues via assigning a gate to each queue. The gates can be open or closed, which are controlled by a Gate Control List (GCL), specifying the duration for which the gates are open or closed. An open gate allows traffic transmission from the queue, while it blocks the transmission when it is closed. Figure below shows a port with eight queues controlled by gates.
The GCL provides information of which queue should transmit the traffic at what point in time. The GCL is usually created by a designer that repeats during the operation. For example, in the above figure, at time T0, only gate of queue 0 (Q0) is open for transmission, while at time T1 the gate will be closed, instead other queues can transmit their traffic. Note that if multiple queues have their gates open, the Strict Priority selector starts with the highest priority queue. Deriving the gate states for a large network is a non-trivial task, which is usually done using solvers such as Integer Linear Programing or Constraint Programing solutions. The GCL is a cyclic operation, i.e., the designer needs to find the gate status for an LCM of periodic frames. Depending on the network size, the gates status can be large which makes it very difficult to configure in the simulation or even on the hardware. The main purpose of our plugin is to facilitate the gates status configuration in TSN networks.
Architecture of the plugin
The main architecture of the plugin is depicted in the figure below. It contains several modules, including: (i) traffic generator, (ii) schedule synthesizer, (iii) automated configurator, (iv) output and results interpreter.
- The traffic generator module generates attributes of the TSN flows that are required in the simulator. These attributes include the traffic size, periodicity, deadlines, traffic class, and routing. These attributes are generated randomly.
- The schedule synthesizer module uses a constrained-based solver to find a suitable solution to schedule the generated traffic offline. We employ an open-source SMT/OMT solver (Z3) that features both satisfiability and optimization solvers.
- The automated configurator provides a user interface to show the flows, schedules, routing settings, and gate states for the switch ports. At this stage, the parameters can also be manipulated manually by the users. Moreover, this module translates the settings and configurations into the OMNeT++ configuration files. The outputs are now used to simulate a TSN network using NeSTiNg over OMNeT++.
- Results module is also developed to show the simulations results, mainly the end-to-end delays for the traffic and specify the deadline misses if any occurs during the simulation
Since the plugin is open source and developed in a modular way, the modules can be modified easily by other developers. For instance, in the current version we use a Constraint Programming solution to derive the gates status. However, this can be updated or modified to use other heuristics or meta-heuristic solutions.
An example of a TSN network
Let us assume that we have a network to test and evaluate consisting of 5 TSN switches and 12 end stations (ES0 to ES11). The figure below shows the network with the topology and the connections.
The network speed in all links is set to 1 Gbit/s and a set of traffic is generated with periods between 1000 to 5000 microseconds. The size of all payloads is 1542 Bytes, as the maximum possible payload in Ethernet frames. With such a network, the complexity of configuring every switch is high, as shown in the table below for this example. The number of gates that should be configured for each switch depends on the traffic crossing each port in each switch. The gate states are used in the GCL.
Switches | Total gate state changes |
Switch 0 (SW0) | 135 |
Switch 1 (SW1) | 21 |
Switch 2 (SW2) | 80 |
Switch 3 (SW3) | 123 |
Switch 4 (SW4) | 74 |
The plugin helps to configure them automatically after scheduling the traffic with the synthesizer module. Note that since the tool is open source and the plugin is modular, one can modify or change the synthesizer to any scheduler available. A user can also check the schedules for each port and queue of the port visually and change them manually as desired.
Figure below shows the visualization of the user interface. In the figure, only SW0 is shown with its connections. After selecting the connection (or the link that SW0 is connected to), the user can see the ports. By clicking on the port, a view of the port with all 8 queues is shown that indicates the gates status for each time slot. The gates can be open or closed for each queue of the port and the time slots can be defined. This heavy configuration is automatic, while the user interface gives a chance to the user to modify or visualize.
Future plans
The above work has been published in a paper with a link to the source code available to the public. There are several directions to continue with the tool as follows:
- Synthesizer module can be improved to accommodate more scheduling algorithms. The literature now contains a vast number of heuristics that can be implemented with fast, yet efficient, scheduling of the traffic in TSN networks.
- Topology can be extended to generate random networks for evaluating different mechanisms.
- AVB traffic has not been considered in this tool, yet can be a significant help to evaluate more complex networks.
Authors:
Bahar Houtan, Albert Bergström, Mohammad Ashjaei, Masoud Daneshtalab, Mikael Sjödin, Saad Mubeen: present and past members of the Heterogeneous Systems – Hardware and Software Co-design research group at Mälardalen University (MDU).
Interested readers can follow our work here: B. Houtan, A. Bergström, M. Ashjaei, M. Daneshtalab, M. Sjödin and S. Mubeen, “An Automated Configuration Framework for TSN Networks,” 22nd IEEE International Conference on Industrial Technology (ICIT), Valencia, Spain, 2021. DOI: 10.1109/ICIT46573.2021.9453628
The plugin can be found here: https://gitlab.com/Scipsybee/automated-tsn-configuration-plugin
Disclaimer: Any views or opinions represented in this blog are personal, belong solely to the blog post authors and do not represent those of ACM SIGBED or its parent organization, ACM.