# Scheduling for Media Function Virtualization
## 2 Research Context
### DetNet and CSQF Scheduling  
The efforts to incorporate performance guarantees such as zero packet loss and bounded end-to-end delay and jitter have continued for many years. A set of standards referred as time-sensitive networking was developed under IEEE 802.1 Ethernet to provide deterministic performance over local area networks (LANs). To this end, TSN employs mechanisms such as priority queuing, frame preemption, traffic shaping, etc. However, these mechanisms are not suited for large-scale IP networks. The IETF deterministic networking (DetNet) working group builds upon the TSN mechanism to support deterministic performance in large networks [6]. Cycle specified queuing and forwarding (CSQF) is a DetNet mechanism that evolved from a TSN mechanism called cycle queuing and forwarding [7]. CQF, also known as a peristaltic shaper, proposes to have, in each node, two queues per output port that operate in a ping-pong manner. At any instance of time, one queue is receiving packets from the upstream nodes and the other queue is transmitting to the downstream node. The time interval for which a queue receives (or transmits) packets is fixed and referred to as cycle time (\(T_{c}\)). It can be proved that using the two-queue model along a path in the next results in bounded delay and latency. However, CQF is incompatible with large-scale networks, as it requires the packets transmitted during a cycle time to be received in the same cycle time and transmitted in the next cycle, thus limiting the length of the physical links. In contrast, CSQF has no such requirement; this is discussed next. Contrary to CQF, CSQF specifies the transmission time of packets along the path between the source and destination. The requirement to receive the packet in the cycle it was transmitted is no longer required. To achieve this, each CSQF-enabled node is equipped with multiple queues \(N_{q}\) (generally \(N_{q}\geq 3\)) per port, as shown in Figure 2. During a cycle time, one queue receives packets from the upstream nodes, and another queue transmits the packets it has received in the previous cycle. Here, another queue allows reception of the packets that were supposed to arrive in the next cycle. The early arrival could be due to variation in the processing time of the previous node. Moreover, this queue can be used to delay the arrival of specific packets by \(T_{c}\). The role of packet transmission (and reception) is rotated cyclically among all the queues in each \(T_{c}\). The time after which the application sender repeats the transmission pattern is referred to as a hypercycle, usually expressed as a multiple of cycle times. By having more than two queues in CSQF, a packet could be delayed by a specific amount (\((N_{q}-2)T_{c}\))) by queuing the packet in a specific queue. In other words, at each node, the received packet should not only be forwarded to the right node, i.e., routing, but it should also be received in the right queue, i.e., scheduling. This can be achieved using segment routing (SR). After a packet is received at a node, its SID (SR identification) is used to first decide the output port. Each output port is associated with a number of SIDs, each of which corresponds to a queue. After the port selection, the SID is mapped to a  
Figure 2: Mapping of cycle times to queues in the CSQF operation. specific queue for reception and the packet is received in the mapped queue. By appending the packet to a stack of SID labels, the routing and scheduling at all the nodes of a path can be determined. It is worth noticing that there is no need to maintain a per-flow state in the intermediary nodes [7]. This allows scaling to large networks along with supporting a large number of flows. As mentioned previously, an upper limit on timing metrics is required to ensure that broadcast quality is maintained. To this end, media streams between VMFs can be scheduled using CSQF.