The IEEE 802.1 TSN TG (Time Sensitive Networking Technical Group), started in 2012, develops and standardizes technologies to address QoS requirements pertaining to timing and reliability on top of Ethernet. In particular, the TSN TG has developed several mechanisms that provides a predictable, sometimes deterministic, timing behavior in e.g. amendements IEEE 802.1Qbv (Time-Aware Shaper – TAS), IEEE 802.1Qbu (Frame Preemption) and IEEE 802.1Qcr (Asynchronous Traffic Shaper – ATS). These new set of mechanisms add to the well-know Credit-Based Shaper (CBS), standardized in IEEE 8021.Qav, which pre-dates TSN. 

With such a diversity of mechanisms and possible combinations of mechanisms, as they can be used in a combined manner, it is oftentimes difficult, even with extensive trial and error, to identify the ones that are suited to a given application, i.e. the ones that will actually allow to meet the application timing constraints like latency and throughput constraints. This post will try to shed some light on this issue.

Let’s go back to the basics. The delays experienced by a packet between the sender and the receiver(s), usually mostly (*) come from the interferences created by the rest of the traffic. This is why meeting timing constraints means successfully managing the interfering traffic and that is the purpose of any the timing QoS mechanisms that have been developed within the TSN working groups. 

There are three types temporal interferences. Indeed, timing interferences, and thus delays, are either caused by higher priority, same priority and lower-priority packets, each TSN QoS mechanism allowing to control one or several types of these interferences. Let’s have a look at each type of interferences and how to combat them:

  • A lower-priority packet ongoing transmission on the egress port will delay a higher priority packet arrived later on the egress port. The blocking factor is the maximal interference occurring at each hop due to a lower priority frame (up to about 123us per switch at 100Mbit/s). With frame preemption (Qbu), the blocking factor will be reduced by more than a factor 10. The second mechanism to reduce lower priority interference, actually to eliminate it in certain cases, is TAS (Qbv), which reserves transmission windows in advance for the packets belonging certain traffic classes. Frame preemption and TAS belong to what we call blocking reduction mechanisms.
  • Same-priority packets, ahead in the waiting queues on the egress ports, will also create delays and here neither of the two blocking reduction mechanisms will help. The best option here is often to re-classify / re-prioritize the streams so that streams having very different timing requirements do not share the same traffic class. Typically new traffic classes will be created and reserved for the streams with the most stringent constraints. The way priorities are assigned is of course key, a sub-optimal allocation can be worse than the use of a single priority class! In specific use-cases, such as video streams or large data transfer  (TFTP, TCP), traffic shaping e.g. with CBS can provide an help too, allowing multiple same-priority streams to all meet their contraints, but that hold only for segmented transmissions.
  • Higher-priority packets will of course create delays. Besides re-classification of the streams, the other mechanism is traffic shaping, which consists in introducing delays, pauses, between the transmission of the successive packets making up a stream. This allows lower-priority packets to get transmitted in the holes that have been created. The prominent traffic Shaping policy in TSN is the Credit-Based-Shaper (CBS), implemented in hardware. Software-implemented strategies may be possible if the traffic intensity is not too high, they may be even needed on top of CBS to create a form of pre-shaping that is beneficial (and enforce the so-called Class Measurement Interval requirements).

As we have seen, the TSN QoS mechanisms allow to control one or several types of these interferences, but not all of them. They have thus to be selected in light of the amount of each kind of interferences among the streams making up the application. As one the promise of TSN is to transmit mixed-criticality traffic on a shared network, often several different QoS mechanisms will be required, possibly not supported uniformly all across the network.

TSN mechanisms are needed not only for timing but also for reliability and to guarantee that the available memory in the network devices will not be exhausted at run-time. In our experience, there are applications where memory in switches becomes the limiting factor much more quickly than timing constraints, and here again the selected QoS mechanisms will make an important difference. Let’s keep that aside for a follow-up blog post!

Interested to know more on this topic? download this paper and associated presentation slides here.

You are of course most welcome to contact us.

(*) Beside interfering traffic, the other delays are 1) hardware delays such as switching and propagation delays, and 2) possibly delays created by shaping strategies which essentially consist in delaying the transmission of the packets.