Latency Analysis of Multiple Classes of AVB Traffic in TSN with Standard Credit Behavior using Network Calculus

05/17/2020 ∙ by Luxi Zhao, et al. ∙ Beihang University DTU ONERA 0

Time-Sensitive Networking (TSN) is a set of amendments that extend Ethernet to support distributed safety-critical and real-time applications in the industrial automation, aerospace and automotive areas. TSN integrates multiple traffic types and supports interactions in several combinations. In this paper we consider the configuration supporting Scheduled Traffic (ST) traffic scheduled based on Gate-Control-Lists (GCLs), Audio-Video-Bridging (AVB) traffic according to IEEE 802.1BA that has bounded latencies, and Best-Effort (BE) traffic, for which no guarantees are provided. The paper extends the timing analysis method to multiple AVB classes and proofs the credit bounds for multiple classes of AVB traffic, respectively under frozen and non-frozen behaviors of credit during guard band (GB). They are prerequisites for non-overflow credits of Credit-Based Shaper (CBS) and preventing starvation of AVB traffic. Moreover, this paper proposes an improved timing analysis method reducing the pessimism for the worst-case end-to-end delays of AVB traffic by considering the limitations from the physical link rate and the output of CBS. Finally, we evaluate the improved analysis method on both synthetic and real-world test cases, showing the significant reduction of pessimism on latency bounds compared to related work, and presenting the correctness validation compared with simulation results. We also compare the AVB latency bounds in the case of frozen and non-frozen credit during GB. Additionally, we evaluate the scalability of our method with variation of the load of ST flows and of the bandwidth reservation for AVB traffic.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Ethernet is a well-established network protocol that has excellent bandwidth, scalability, compatibility and cost properties [1]. However, it was not suitable for real-time and safety critical applications [2]. Distributed safety-critical applications, like those found in the aerospace, automotive and industrial automation domains, require certification evidence for the correct real-time behavior of critical communication. Therefore, several extensions to the Ethernet protocol have been proposed, such as, ARINC 664 Specification Part 7 [3], TTEthernet [4], and EtherCAT [5]. In 2012, the IEEE 802.1 Time-Sensitive Networking (TSN) Task Group [6] has been founded to define standard real-time and safety-critical enhancements for Ethernet.

TSN integrates multiple traffic types and supports interactions in several combinations. In this paper we consider a TSN solution supporting Credit-Based Shaper (CBS), previously defined for Audio-Video Bridging (AVB) in 802.1BA [8], currently in [7, § 8.6.8.2], with enhancements for Scheduled Traffic (previously defined in 802.1Qbv [9], now in [7, § 8.6.8.4]) based on Gate-Control Lists (GCLs). We call this architecture TSN/GCL+CBS. We consider three traffic-types with varying criticalities: Scheduled Traffic (ST) which is also known as Time-Triggered (TT) traffic, AVB traffic and Best-Effort (BE) traffic. ST traffic supports hard real-time applications that require very low latency and jitter (e.g., industrial control requires 1–10 milliseconds latency and microseconds jitter). It is transmitted based on schedule tables called GCLs that rely on a global synchronized clock (802.1ASrev [10]). AVB traffic is intended for applications that require bounded end-to-end latencies, but has less time-critical compared with ST traffic. It uses the CBS to prevent the starvation of lower priority AVB traffic. The TSN Task Group has extended AVB architecture, allowing the definition of multiple CBS [7, § 5.4.1.5], so we consider any number of AVB classes. BE traffic is used for applications that do not require any timing guarantees and is mapped to the remaining queues.

The schedulability of the scheduled ST traffic can be guaranteed during design phase by considering individual scheduling of ST flows and synthesizing the GCLs [11]. For more generic window-based GCLs, Zhao et al. [12] have proposed a Network Calculus (NC)-based method to analyze the latency bounds for flexible window-based ST traffic. Researchers have extended the analysis to the preemption mode using Real-Time Calculus [13]. Moreover, AVB in TSN can be used for time-critical applications that require bounded latency even though it has lower time-critical than ST traffic. Hence it is very important to have a safe and guaranteed WCD analysis for AVB that takes into account the ST flows. Although latency analysis methods have been successfully applied to AVB traffic in AVB networks [14, 15, 16], they do not take account for the interference of ST traffic on the AVB traffic and only consider two or three AVB classes. Recently, Cao et al. [17] have proposed an eligible interval based formal analysis on the calculation of worst-case performance bounds for multiple classes of AVB traffic. However, they do not consider the effect of ST traffic on AVB traffic, and focus only on the “relative delay” on a single hop. Network Calculus-based analyses have been proposed [18] to compute the WCDs of Rate-Constrained (RC) traffic with the consideration of the ST (also named Time-Triggered, or TT) frames in TTEthernet, but the techniques are not applicable for TSN: RC traffic has no CBS, the integration modes are different in TSN and TTEthernet and TSN schedules ST traffic differently from TTEthernet: individual ST frames are considered in TTEthernet, whereas TSN schedules ST windows which may include several ST frames.

The timing analysis of non-ST traffic types in TSN has been addressed in [19], considering closed-gate blocking, strict priorities and a “Peristaltic Traffic Shaper”. However, their analysis is not applicable to AVB, which uses CBS. Researchers [20],[21] have proposed the latency bounds for AVB traffic affected by control-data-traffic (CDT) in TSN, but assuming CDT as leaky bucket (LB) or length rate quotient (LRQ), which does not fit for the ST traffic. The AVB Latency Math equation has been extended to consider the ST traffic in TSN [22]. However, it does not consider the actual situations for AVB flows in the network, but just assumes that maximum allowable bandwidth is occupied by the corresponding AVB traffic class, thus causing overly pessimistic, i.e., leading to overly large WCDs. In addition, [22] can only be used to determine the WCDs of AVB Class A traffic. Researchers have extended the Eligible Interval Analysis (EIA) to calculate the delay of two classes of AVB traffic in TSN [23]. However, it does not consider relative offsets between ST windows, but just assumes the ST windows always arranging back-to-back. The initial idea for the two classes of AVB analysis under the influence of ST traffic in TSN network based on the Network Calculus has been given by [24], and then credit bounds for CBS are improved in [25]. However, all these analyses above are based on a credit behavior deviating from the standard 802.1Q-2018 [7], i.e., assuming credit frozen during guard band before gate closing. Moreover, the latest standard 802.1Q supports any number of AVB classes, which are not supported in previous analysis work. Thus, in this paper, we are interested to propose a formal performance analysis method for arbitrary number of AVB classes in TSN networks, under both behaviors of frozen and non-frozen credit during guard band (GB, cf. Sect. III for details).

The main contributions of our paper are as follows:

  1. [leftmargin=4pt]

  2. To the best of our knowledge, our analysis is the first one to prove the credit bounds of CBS in the cases of frozen and non-frozen credit during guard band. The analysis is able to handle with arbitrary number of AVB classes under the influence of ST traffic for the whole TSN network.

  3. We reduce the pessimism of the analysis and this provides tighter latency bounds for AVB, by introducing the limitations from the physical link rate and the output of CBS, which are denoted as the link and CBS shaping curves with the consideration of ST traffic.

  4. We evaluate the proposed approach on both synthetic and real-world test cases, comparing AVB latencies in cases of frozen and non-frozen credit during guard bands, and comparing with related work and simulation results to show the significant reduction of pessimism on latency bounds, and to validate the correctness and the scalability of our implementation.

The paper is organized as follows. Sect. II presents the system model. Sect. III introduces TSN. Sect. IV briefly introduces the Network Calculus concepts needed for the analysis. Sect. V gives the proof of credit bounds for multiple classes of AVB traffic respectively under frozen and non-frozen behaviors of credit during GB and presents tighter AVB latency bounds by introducing shaping curves. Sect. VI evaluates the proposed analysis and Sect. VII concludes the paper.

Ii System Model

A TSN network is composed of a set of end systems (ES) and switches (SW) also called nodes, connected via physical links. In this paper, we assume, without loss of generality, that all physical links have the same rate . The links are full duplex, allowing thus communication in both directions, and the networks can be multi-hop. The output port of a SW is connected to one ES or an input port of another SW.

The messages are sent from ESes via flows, which have a single source and may have multiple destinations. Each source ES is able to send multiple flows to the network. As mentioned, our TSN solution supports three traffic types: ST [7, § 8.6.8.4], AVB [7, § 8.6.8.2] and BE. We assume that the traffic type for each application has been decided by the designer. The subscripts () for AVB denote respectively the different AVB traffic classes. For ST traffic, we know the GCLs in each output port of nodes, i.e., the opening and closing time of ST traffic (named as ST window) and GCL period (). For an AVB flow , we know its frame size , the minimum frame interval in the source ES and the traffic class it belongs to. The AVB Class has higher priority than the AVB Class . The flows assigned the same AVB traffic class are served in FIFO order. Moreover, we know the maximum frame size of BE traffic.

Iii TSN/GCL+CBS Output Port

Fig. 1: TSN/GCL+CBS architecture for an output port in an ES/SW

The TSN Task group has defined a set of schedulers, which can interact in several combinations. In this paper, we assume a specific configuration, called TSN/GCL+CBS architecture to provide different real-time guarantees and will present how ST and AVB flows are transmitted in this case, as shown in Fig. 1. Each one has eight queues for storing frames that wait to be forwarded on the corresponding link, one or more for ST queues, two or more () for AVB queues (respectively for Class ) and the remaining queues are used for BE. Every queue has a gate with two states, open and closed. Frames waiting in the queue are eligible to be forwarded only if the associated gate is open.

The gates for each queue are controlled by GCLs, which are created offline and contain the times when the associated gates are open and closed [11]. In this study, we assume that when associated gate for ST traffic is open, the remaining gates for other traffic (AVB and BE) are closed, and vice versa (aka. exclusive gating). Therefore, AVB traffic is prevented from transmitting in the time windows reserved for ST frames.

In addition, two integration modes are introduced to solve the issue when an AVB frame is already in transmission at the beginning of time window for ST, i.e., non-preemption [7, Annex Q] and preemption [7, Annex S] modes. In this paper, we focus on the discussion of the non-preemption integration mode (see Fig. 2) and the analysis model is also suitable for the preemption integration mode combined with HOLD/RELEASE. The non-preemption mode uses a “guard band” before each ST window to prevent the AVB frame from initiating transmission if there is insufficient time available to transmit that entire frame before the open event of ST gate. The preemption mode combined with HOLD/RELEASE also uses a guard band, but with a rather smaller size [7, Annex S.4]. The “guard band” will lead to wasted bandwidth due to the guard band, but it ensures no delay for ST traffic.

Fig. 2: Non-preemption integration modes

An enqueued AVB frame is transmitted only if the associated gate is open and the Credit-Based Shaper (CBS) [7, § 8.6.8.2] permits it. Each AVB queue has a credit value, initialized to zero. When the AVB gate is closed, the associated credit is “frozen”. When the associated AVB gate is open, the variation of credit is the same as the one in AVB networks [8], i.e., decreasing with a send slope () during the transmission of an AVB frame and increasing with an idle slope () when AVB frames are waiting to be transmitted due to other higher priority AVB frames or the negative credit. This is illustrated for example in Fig. 3, where we have three AVB classes (), and show the variation of credit for respective AVB class. Particularly, during guard bands, we assume two behaviors of the credit for AVB traffic. One is “non-frozen”, obeying the behavior of credit in the standard. The other is “frozen”, of which the behavior deviating from the standard, but is a model assumption for most existing work. Daigmorte et al. [26] have shown that the credit evolution rule with guard band in the standard is unfair, which is an argument for an update of the standard to consider the credit evolution rule to be frozen.

Iv Network Calculus Background

Network Calculus [27] is a mature theory proposed for deterministic performance analysis. It is used to construct arrival and service curve models for the investigated flows and network nodes. Network Calculus functions mainly belong to non-decreasing functions and null before 0: . Two basic operators on are the convolution ,

(1)

and deconvolution ,

(2)

where means infimum and means supremum.

An arrival curve is a model constraining the arrival process of a flow, in which represents the input cumulative function counting the total data bits of the flow that has arrived in the network node up to time . We say that is constrained by iff for all ,

(3)
Fig. 3: CBS example with non-preemption mode

A service curve models the processing capability of the available resource. Assume that is the departure process, which is the output cumulative function that counts the total data bits of the flow departure from the network node up to time . There are several definitions for service curve. We say that the network node offers the min-plus minimum service curve for the flow iff

(4)

and offers the strict service curve iff

(5)

during any backlog period . In addition, in order to evaluate service curves we will use the non-decreasing non-negative closure defined by

A shaping curve characterizes the maximum number of bits that are served during a period of time , which means that the departure process from the server always respects the shaping curve. A server offers a shaping curve iff could be an arrival curve for all output cumulative function (Eq. 3). Note that the shaping curve from the output can also be said as an arrival curve for the subsequent nodes.

If a flow of arrival curve crosses a server with the service curve , then the output flow can be bounded by the arrival curve ,

(6)

It can also be taken as an arrival curve of input flow for the next node.

Let us assume that the flow constrained by the arrival curve traverses the network node offering the service curve . Then, the latency experienced by the flow in the network node is bounded by the maximum horizontal deviation between the graphs of two curves and ,

(7)

The network end-to-end delay of a frame along its route is defined as the time duration between the instant it is transmitted by the source ES on the link and the instant it is fully received by the destination ES. The worst-case end-to-end delay of the flow can be bounded by the sum of latency bounds in each network nodes along its route.

V Worst-case Analysis for AVB Traffic

V-a Service Curve for AVB Traffic

In this section, we will extend the service curve in [24] to multiple AVB Class () with respectively (i) non-frozen and (ii) frozen credit during guard band. The service curve for AVB traffic depends on the working mechanism of CBS. As can be seen from Fig. 3, no matter the case (i) or (ii) for each AVB traffic Class , any time interval can be decomposed into

(8)

where (resp. ) represents the accumulated length of all period where the credit increases (resp. decreases), and is the frozen time of credit. The service could only be supplied for AVB traffic during the descent time of credit. Then, the service curve for multiple classes of AVB traffic is given by the following theorem.

Theorem 1

The min-plus minimum service curve for AVB Class () under non-preemption mode in an output port is given by

(9)

where represents the behavior of credit during GB, and is the arrival curve with regard to credit frozen. In case of , i.e., (i) non-frozen credit during GB, is only related to higher priority ST traffic, while in case of , i.e., (ii) frozen credit during GB, should additionally take guard band slots into account. and are respectively given by Lemma 1 and Lemma 2 in Sect. V-C. is the upper bound of credit of Class under cases of (i) non-frozen or (ii) frozen credit during GB, and given by Eqs. (11) or (12). The proof of credit bound has to be extended to an arbitrary number of AVB classes and to consider different behaviors of credit during guard band, which is one of the challenges in this paper and will be discussed in Sect. V-B. The proof Theorem 1 is similar as the one given in [24], hence it will not be further discussed in this paper.

V-B Bounding the Credit for AVB Traffic

In this section, we bound the credit for AVB traffic. Let us recall from Sect. III how AVB is transmitted.

Theorem 2

(Lower bound of Class ) Let be the maximal frame size of any flow crossing the AVB queue . Then, the credit of Class is lower bounded by [14, 24],

(10)

Before we start to prove the upper bound of credit, let us define some notations. Let denotes the same or higher priority AVB queues and denotes the lower priority AVB queues. Then for , the interval can be partitioned into several kinds of intervals: let and respectively denote the duration of emissions of frames from the queue and of high priority frames from the queue ; is the time slot reserved for ST traffic, i.e., the duration where the gates of AVB queues are closed; is the duration where a frame in waits due to a lower priority frame in queue or that is being transmitted cannot be preempted; denotes the guard band duration where for all queues with no frame can be sent, as there is no sufficient time available to transmit the entire frame before the next closing event; and is the interval except all the definitions above. Then we have .

Theorem 3

(Higher bound of Class ) Let be the maximal frame size of a BE flow. The credit of Class is upper bounded by,

  1. [(i)]

  2. non-frozen credit during GB

    (11)
  3. frozen credit during GB

    (12)

where , is the lower bound of credit of Class from Theorem 2, and and are the parameters of upper envelope related to guard band duration and satisfy for ,

(13)

which will be discussed in the end of Sect.V-C.

Proof: Considering the evolution of the credit, the maximal value of credit will only happen at the instant satisfying the following definition. Let be a time point when AVB gates are in the open state, and . Then let us define . It implies that , , , i.e., there always exists at least one queue in with some frame to send. Otherwise, we can always find another that satisfies . As it always exists one queue in with some frame to send, either it succeeds (there is a frame of emission, or a high-priority frame in emission) or is blocked (non-preemption or guard band or ST traffic transmission). Thus here. In the following, as are fixed, the will be simplified to .

(i) For the case of non-frozen credit during GB

Consider first the evolution of the credit value of between and . The credit increases at speed when the frame in the queue is waiting (during ), decreases at speed when the frame in the queue is transmitting (during ), is not modified when the gate of is closed during ST traffic transmission, and may be reduced from some positive value to 0 due to resets. Thus the variation of during is,

(14)

Since and , Eq. (14) is modified into,

(15)

Let denote the sum of credits of AVB traffic with the priority higher than . Consider three cases: first, at any instant between and either a frame of uses the link, or a low priority frame blocks the link or during GB, the credit of each non-empty queue increases with speed . Then the sum of credits increases at most at speed . Or a frame from class with higher priority than is being sent. In this case decrease at least at speed (all the classes from gain credit expect one which loses credit). The last case is like for , may decrease due to a set of resets. Then it is possible to upper bound the variation of between and ,

(16)

By definition of , it exists continuously some queue trying to send a frame. Hence there is at most one low priority frame that can get access to the link before and go on transmission due to non-preemption. Thus

Moreover, we assume that there exists and which will be discussed in Sect. V-C such that ,

Thus Eq. (16) is modified to obtain,

(17)

Considering the system is assumed to be not overloaded, we have . Thus, from Eq. (17)

(18)

Then from (18), (15) is modified to obtain,

By definition of s, we have and as well. Moreover, if is the lower bound of credit of Class , then so to conclude,

(ii) For the case of frozen credit during GB

The proof is similar to the above process, except the difference of the evolution of credit of during GB. The credit increases at speed during , decreases at speed during , and is not modified during guard band and ST traffic transmission . Then the variation of during is upper bounded by,

(19)

Additionally, for the sum of credits of AVB traffic with the priority higher than , it increases at most as speed when the frame of uses the link (during ) or a low priority frame blocks the link (during ),

(20)

Similarly, considering the system is assumed to be not overloaded, we have . Thus, from Eq. (20)

(21)

Then from (21), (19) is modified to obtain,

Thus, the upper bound of is to conclude,

 

V-C Arrival Curve of ST/GB duration

In this section, the arrival curve of ST/GB duration is constructed. It is used to derive the leftover service curve for AVB traffic of Class , as AVB traffic cannot be transmitted when credit is frozen. As discussed above, credit will be frozen during ST time slots (windows) depending on the GCL, and whether it is frozen during GB intervals depends on the behavior selection.

Fig. 4: Guard bands and ST windows

ST traffic is scheduled within specific ST windows according to GCLs. The GCL for the output port is repeated after the GCL period , see the example in Fig. 4. Let be the number of ST windows in the GCL period . It is assumed that the th ST window in output port starts at and has duration , and the relative offset between the starting time of the th and th ST windows is For the case of credit non-frozen for AVB traffic during guard bands, the arrival curve for the credit frozen part is only related to ST windows, which is given by the following Lemma.

Lemma 1

The arrival curve of the credit frozen part due to ST traffic in an output port is given by, for all

(22)

where is is one possible arrival curve by selecting th () ST window as the reference; represents the maximum number of bits the could be transmitted during the ST traffic window of length ; each staircase function shows the upper bound of ST transmission in the periodic ST windows of length , and the relative offsets give the relationships between different ST windows within the GCL period. The proof of the lemma is similar to the proof for TT flows in TTEthernet [18].

Moreover, for the case of credit frozen for AVB traffic of Class during GB, the arrival curve for the credit frozen part is not only related to ST windows, but also to GB intervals. A guard band may appear before a ST window, depending on the flow backlog. In the worst-case, the time duration of the guard band before the th () ST window equals to the minimum value of the maximum transmission time () of AVB frames of Class competing in output port and the idle time interval between two consecutive ST windows (th and th windows). We merge the guard band and ST window together to construct the arrival curve of the credit frozen part, the following Lemma is given,

Lemma 2

The arrival curve of the credit frozen part due to ST traffic and guard band in an output port is given by, for all

(23)

where is is one possible arrival curve by selecting the th () ST window as the reference.

In the following, we are interested to derive and defined in Eq. (13) which is used for deriving credit upper bound of AVB Class . They are parameters (burst and long-term rate) related to the upper envelope of accumulated bits in guard band duration in any interval . Additionally, note that and are parameters defined based on in Eq. (13). The following Theorem gives the upper envelope of the guard band defined in Eq. (13) in the form of the staircase function.

Theorem 4

The staircase upper bound on the GB duration defined from Eq. (13) for AVB Class traffic for all is as follows,

(24)

where

(25)

Proof: We need to upper bound the number of in . Introduce . First, consider some and , let

(26)
(27)

Noticing that , Chasle’s relation and leads to

(28)

But any infinite sum on any expression , can be decomposed as a double sum using with

(29)

The system behavior is periodic, so , , , leading to,

(30)

with . Now, remark that , ,

(31)

Combining all leads to

(32)

Let , it exists such that . If , . Using eq. (28), (32), . From Chasles’s relation and comes . And since is non decreasing, it leads to

(33)

If , . But for any ,