In this section, we present a general queuing data model, as well as some examples of queuing mechanisms. For simplicity of latency bound computation, we assume a leaky-bucket arrival curve for each DetNet flow at the source. Also, at each DetNet transit node, the service for each queue is abstracted with a minimum guaranteed rate and a latency [
NetCalBook].
Sophisticated queuing mechanisms are available in Layer 3 (L3) (e.g., see [
RFC 7806] for an overview). In general, we assume that "Layer 3" queues, shapers, meters, etc., are precisely the "regulators" shown in
Figure 1. The "queuing subsystems" in this figure are FIFO. They are not the province solely of bridges; they are an essential part of any DetNet transit node. As illustrated by numerous implementation examples, some of the "Layer 3" mechanisms described in documents, such as [
RFC 7806], are often integrated in an implementation, with the "Layer 2" mechanisms also implemented in the same node. An integrated model is needed in order to successfully predict the interactions among the different queuing mechanisms needed in a network carrying both DetNet flows and non-DetNet flows.
Figure 3 shows the general model for the flow of packets through the queues of a DetNet transit node. The DetNet packets are mapped to a number of regulators. Here, we assume that the Packet Replication, Elimination, and Ordering Functions (PREOF) are performed before the DetNet packets enter the regulators. All packets are assigned to a set of queues. Packets compete for the selection to be passed to queues in the queuing subsystem. Packets again are selected for output from the queuing subsystem.
|
+--------------------------------V----------------------------------+
| Queue assignment |
+--+------+----------+---------+-----------+-----+-------+-------+--+
| | | | | | | |
+--V-+ +--V-+ +--V--+ +--V--+ +--V--+ | | |
|Flow| |Flow| |Flow | |Flow | |Flow | | | |
| 0 | | 1 | ... | i | | i+1 | ... | n | | | |
| reg| | reg| | reg | | reg | | reg | | | |
+--+-+ +--+-+ +--+--+ +--+--+ +--+--+ | | |
| | | | | | | |
+--V------V----------V--+ +--V-----------V--+ | | |
| Trans. selection | | Trans. select. | | | |
+----------+------------+ +-----+-----------+ | | |
| | | | |
+--V--+ +--V--+ +--V--+ +--V--+ +--V--+
| out | | out | | out | | out | | out |
|queue| |queue| |queue| |queue| |queue|
| 1 | | 2 | | 3 | | 4 | | 5 |
+--+--+ +--+--+ +--+--+ +--+--+ +--+--+
| | | | |
+----------V----------------------V--------------V-------V-------V--+
| Transmission selection |
+---------------------------------+---------------------------------+
|
V
Some relevant mechanisms are hidden in this figure and are performed in the queue boxes:
-
discarding packets because a queue is full
-
discarding packets marked "yellow" by a metering function in preference to discarding "green" packets [RFC 2697]
Ideally, neither of these actions are performed on DetNet packets. Full queues for DetNet packets occur only when a DetNet flow is misbehaving, and the DetNet QoS does not include "yellow" service for packets in excess of a committed rate.
The queue assignment function can be quite complex, even in a bridge [
IEEE8021Q], because of the introduction of per-stream filtering and policing ([
IEEE8021Q], clause 8.6.5.1). In addition to the Layer 2 priority expressed in the 802.1Q VLAN tag, a DetNet transit node can utilize the information from the non-exhaustive list below to assign a packet to a particular queue:
-
input port
-
selector based on a rotating schedule that starts at regular, time-synchronized intervals and has nanosecond precision
-
MAC addresses, VLAN ID, IP addresses, Layer 4 port numbers, and Differentiated Services Code Point (DSCP) [RFC 8939] [RFC 8964]
-
the queue assignment function can contain metering and policing functions
-
MPLS and/or pseudowire labels [RFC 6658]
The "Transmission selection" function decides which queue is to transfer its oldest packet to the output port when a transmission opportunity arises.
In [
IEEE8021Q] and [
IEEE8023], the transmission of a frame can be interrupted by one or more "express" frames; then, the interrupted frame can continue transmission. The frame preemption is modeled as consisting of two MAC/PHY stacks: one for packets that can be interrupted and one for packets that can interrupt the interruptible packets. Only one layer of frame preemption is supported -- a transmitter cannot have more than one interrupted frame in progress. DetNet flows typically pass through the interrupting MAC. For those DetNet flows with T-SPEC, latency bounds can be calculated by the methods provided in the following sections that account for the effect of frame preemption, according to the specific queuing mechanism that is used in DetNet nodes. Best-effort queues pass through the interruptible MAC and can thus be preempted.
In [
IEEE8021Q], the notion of time-scheduling queue gates is described in Section 8.6.8.4. On each node, the transmission selection for packets is controlled by time-synchronized gates; each output queue is associated with a gate. The gates can be either open or closed. The states of the gates are determined by the gate control list (GCL). The GCL specifies the opening and closing times of the gates. The design of the GCL must satisfy the requirement of latency upper bounds of all DetNet flows; therefore, those DetNet flows that traverse a network that uses this kind of shaper must have bounded latency if the traffic and nodes are conformant.
Note that scheduled traffic service relies on a synchronized network and coordinated GCL configuration. Synthesis of the GCL on multiple nodes in a network is a scheduling problem considering all DetNet flows traversing the network, which is a nondeterministic polynomial-time hard (NP-hard) problem [
Sch8021Qbv]. Also, at the time of writing, scheduled traffic service supports no more than eight traffic queues, typically using up to seven priority queues and at least one best effort.
In this queuing model, it is assumed that the DetNet nodes are FIFO. We consider the four traffic classes (Definition 3.268 of [
IEEE8021Q]): control-data traffic (CDT), class A, class B, and best effort (BE) in decreasing order of priority. Flows of classes A and B are DetNet flows that are less critical than CDT (such as studio audio and video traffic, as in IEEE 802.1BA Audio-Video-Bridging). This model is a subset of Time-Sensitive Networking, as described next.
Based on the timing model described in
Figure 1, contention occurs only at the output port of a DetNet transit node; therefore, the focus of the rest of this subsection is on the regulator and queuing subsystem in the output port of a DetNet transit node. The input flows are identified using the information in (
Section 5.1 of
RFC 8939). Then, they are aggregated into eight macro-flows based on their service requirements; we refer to each macro-flow as a class. The output port performs aggregate scheduling with eight queues (queuing subsystems): one for CDT, one for class A flows, one for class B flows, and five for BE traffic denoted as BE0-BE4. The queuing policy for each queuing subsystem is FIFO. In addition, each node output port also performs per-flow regulation for class A and B flows using an interleaved regulator (IR). This regulation is called asynchronous traffic shaping [
IEEE8021Qcr]. Thus, at each output port of a node, there is one interleaved regulator per input port and per class; the interleaved regulator is mapped to the regulator depicted in
Figure 1. The detailed picture of scheduling and regulation architecture at a node output port is given by
Figure 4. The packets received at a node input port for a given class are enqueued in the respective interleaved regulator at the output port. Then, the packets from all the flows, including CDT and BE flows, are enqueued in a queuing subsystem; there is no regulator for CDT and BE flows.
+--+ +--+ +--+ +--+
| | | | | | | |
|IR| |IR| |IR| |IR|
| | | | | | | |
+-++XXX++-+ +-++XXX++-+
| | | |
| | | |
+---+ +-v-XXX-v-+ +-v-XXX-v-+ +-----+ +-----+ +-----+ +-----+ +-----+
| | | | | | |Class| |Class| |Class| |Class| |Class|
|CDT| | Class A | | Class B | | BE4 | | BE3 | | BE2 | | BE1 | | BE0 |
| | | | | | | | | | | | | | | |
+-+-+ +----+----+ +----+----+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
| | | | | | | |
| +-v-+ +-v-+ | | | | |
| |CBS| |CBS| | | | | |
| +-+-+ +-+-+ | | | | |
| | | | | | | |
+-v--------v-----------v---------v-------V-------v-------v-------v--+
| Strict Priority selection |
+--------------------------------+----------------------------------+
|
V
Each of the queuing subsystems for classes A and B contains a credit-based shaper (CBS). The CBS serves a packet from a class according to the available credit for that class. As described in Section 8.6.8.2 and Annex L.1 of [
IEEE8021Q], the credit for each class A or B increases based on the idle slope (as guaranteed rate) and decreases based on the sendslope (typically equal to the difference between the guaranteed and the output link rates), both of which are parameters of the CBS. The CDT and BE0-BE4 flows are served by separate queuing subsystems. Then, packets from all flows are served by a transmission selection subsystem that serves packets from each class based on its priority. All subsystems are non-preemptive. Guarantees for class A and B traffic can be provided only if CDT is bounded. It is assumed that the CDT has a leaky-bucket arrival curve with two parameters: r_h as rate and b_h as bucket size. That is, the amount of bits entering a node within a time interval t is bounded by r_h * t + b_h.
Additionally, it is assumed that the class A and B flows are also regulated at their source according to a leaky-bucket arrival curve. At the source, the traffic satisfies its regulation constraint, i.e., the delay due to interleaved regulator at the source is ignored.
At each DetNet transit node implementing an interleaved regulator, packets of multiple flows are processed in one FIFO queue. The packet at the head of the queue is regulated based on its leaky-bucket parameters. It is released at the earliest time at which this is possible without violating the constraint.
The regulation parameters for a flow (leaky-bucket rate and bucket size) are the same at its source and at all DetNet transit nodes along its path in the case where all clocks are perfect. However, in reality, there is clock non-ideality throughout the DetNet domain, even with clock synchronization. This phenomenon causes inaccuracy in the rates configured at the regulators that may lead to network instability. To avoid instability, the rates are set as the source rates with some positive margin when configuring regulators. [
ThomasTime] describes and provides solutions to this issue.
A delay bound of the queuing subsystem ((4) in
Figure 1) of a given DetNet node for a flow of class A or B can be computed if the following condition holds:
The sum of leaky-bucket rates of all flows of this class at this transit node <= R, where R is given below for every class
If the condition holds, the delay bounds for a flow of class X (A or B) is d_X and calculated as:
d_X = T_X + (b_t_X-L_min_X)/R_X - L_min_X/c
where L_min_X is the minimum packet lengths of class X (A or B); c is the output link transmission rate; and b_t_X is the sum of the b term (bucket size) for all the flows of the class X. Parameters R_X and T_X are calculated as follows for class A and B, separately.
If the flow is of class A:
R_A = I_A * (c-r_h)/ c
T_A = (L_nA + b_h + r_h * L_n/c)/(c-r_h)
where I_A is the idle slope for class A; L_nA is the maximum packet length of class B and BE packets; L_n is the maximum packet length of classes A, B, and BE; and r_h is the rate and b_h is the bucket size of CDT leaky-bucket arrival curve.
If the flow is of class B:
R_B = I_B * (c-r_h)/ c
T_B = (L_BE + L_A + L_nA * I_A/(c_h-I_A) + b_h + r_h * L_n/c)/(c-r_h)
where I_B is the idle slope for class B; L_A is the maximum packet length of class A; and L_BE is the maximum packet length of class BE.
Then, as discussed in
Section 4.2.2, an interleaved regulator does not increase the delay bound of the upstream queuing subsystem; therefore, an end-to-end delay bound for a DetNet flow of class X (A or B) is the sum of d_X_i for all node i in the path of the flow, where d_X_i is the delay bound of queuing subsystem in node i, which is computed as above. According to the notation in
Section 4.2.2, the delay bound of the queuing subsystem in a node i and interleaved regulator in node j, i.e., Cij, is:
Cij = d_X_i
More information of delay analysis in such a DetNet transit node is described in [
TSNwithATS].
The delay bound calculation requires some information about each node. For each node, it is required to know the idle slope of the CBS for each class A and B (I_A and I_B), as well as the transmission rate of the output link (c). Besides, it is necessary to have the information on each class, i.e., maximum packet length of classes A, B, and BE. Moreover, the leaky-bucket parameters of CDT (r_h, b_h) must be known. To admit a flow or flows of classes A and B, their delay requirements must be guaranteed not to be violated. As described in
Section 3.1, the two problems (static and dynamic) are addressed separately. In either of the problems, the rate and delay must be guaranteed. Thus,
-
The static admission control:
-
The leaky-bucket parameters of all class A or B flows are known; therefore, for each flow f of either class A or B, a delay bound can be calculated. The computed delay bound for every flow of class A or B must not be more than its delay requirement. Moreover, the sum of the rate of each flow (r_f) must not be more than the rate allocated to each class (R). If these two conditions hold, the configuration is declared admissible.
-
The dynamic admission control:
-
-
For dynamic admission control, we allocate a static value for rate (R) and a maximum bucket size (b_t) to every node and each class A or B. In addition, for every node and each class A or B, two counters are maintained:
-
R_acc is equal to the sum of the leaky-bucket rates of all flows of this class already admitted at this node; at all times, we must have:
R_acc <= R, (Eq. 1)
b_acc is equal to the sum of the bucket sizes of all flows of this class already admitted at this node; at all times, we must have:
b_acc <= b_t. (Eq. 2)
A new class A or B flow is admitted at this node if Eqs. (1) and (2) continue to be satisfied after adding its leaky-bucket rate and bucket size to R_acc and b_acc. A class A or B flow is admitted in the network if it is admitted at all nodes along its path. When this happens, all variables R_acc and b_acc along its path must be incremented to reflect the addition of the flow. Similarly, when a class A or B flow leaves the network, all variables R_acc and b_acc along its path must be decremented to reflect the removal of the flow.
The choice of the static values of R and b_t at all nodes and classes must be done in a prior configuration phase: R controls the bandwidth allocated to this class at this node, and b_t affects the delay bound and the buffer requirement. The value of R must be set such that
R <= I_X*(c-r_h)/c
where I_X is the idleslope of credit-based shaper for class X={A,B}, c is the transmission rate of the output link, and r_h is the leaky-bucket rate of the CDT class.
The Guaranteed Service is defined in [
RFC 2212]. The flow, at the source, has a leaky-bucket arrival curve with two parameters: r as rate and b as bucket size, i.e., the amount of bits entering a node within a time interval t is bounded by r * t + b.
If a resource reservation on a path is applied, a node provides a guaranteed rate R and maximum service latency of T. This can be interpreted in a way that the bits might have to wait up to T before being served with a rate greater or equal to R. The delay bound of the flow traversing the node is T + b / R.
Consider a Guaranteed Service [
RFC 2212] path including a sequence of nodes, where the i-th node provides a guaranteed rate R_i and maximum service latency of T_i. Then, the end-to-end delay bound for a flow on this can be calculated as sum(T_i) + b / min(R_i).
The provided delay bound is based on a simple case of Guaranteed Service, where only a guaranteed rate and maximum service latency and a leaky-bucket arrival curve are available. If more information about the flow is known, e.g., the peak rate, the delay bound is more complicated; the details are available in [
RFC 2212] and Section 1.4.1 of [
NetCalBook].
Annex T of [
IEEE8021Q] describes Cyclic Queuing and Forwarding (CQF), which provides bounded latency and zero congestion loss using the time-scheduled gates of Section 8.6.8.4 of [
IEEE8021Q]. For a given class of DetNet flows, a set of two or more buffers is provided at the output queue layer of
Figure 3. A cycle time T_c is configured for each class of DetNet flows c, and all of the buffer sets in a class of DetNet flows swap buffers simultaneously throughout the DetNet domain at that cycle rate, all in phase. In such a mechanism, the regulator, as mentioned in
Figure 1, is not required.
In the case of two-buffer CQF, each class of DetNet flows c has two buffers, namely buffer1 and buffer2. In a cycle (i) when buffer1 accumulates received packets from the node's reception ports, buffer2 transmits the already stored packets from the previous cycle (i-1). In the next cycle (i+1), buffer2 stores the received packets and buffer1 transmits the packets received in cycle (i). The duration of each cycle is T_c.
The cycle time T_c must be carefully chosen; it needs to be large enough to accommodate all the DetNet traffic, plus at least one maximum packet (or fragment) size from lower priority queues, which might be received within a cycle. Also, the value of T_c includes a time interval, called dead time (DT), which is the sum of delays 1, 2, 3, and 4 defined in
Figure 1. The value of DT guarantees that the last packet of one cycle in a node is fully delivered to a buffer of the next node in the same cycle. A two-buffer CQF is recommended if DT is small compared to T_c. For a large DT, CQF with more buffers can be used, and a cycle identification label can be added to the packets.
The per-hop latency is determined by the cycle time T_c: a packet transmitted from a node at a cycle (i) is transmitted from the next node at cycle (i+1). Then, if the packet traverses h hops, the maximum latency experienced by the packet is from the beginning of cycle (i) to the end of cycle (i+h); also, the minimum latency is from the end of cycle (i), before the DT, to the beginning of cycle (i+h). Then, the maximum latency is:
(h+1) T_c
and the minimum latency is:
(h-1) T_c + DT.
Ingress conditioning (
Section 4.3) may be required if the source of a DetNet flow does not itself employ CQF. Since there are no per-flow parameters in the CQF technique, per-hop configuration is not required in the CQF forwarding nodes.