# A QoS-Enabled Medium-Transparent MAC Protocol for Fiber-Wireless 5G RAN Transport Networks
## 3 The QoS-Aware MT-MAC Protocol
### The QoS-Enabled MT-MAC  
This section presents the proposed QoS-enhanced version of the MT-MAC protocols, termed qMT-MAC, specifically designed to offer QoS functionalities to the MT-MAC protocols, in order to be able to support all the traffic types present in 5G RAN transport networks, as explained in Section 2. With respect to the 1 st and 2 nd CPs, the qMT-MAC protocol follows the same operational rules as the previously described MT-MAC protocols. However, as opposed to the PS creation policies described in Section 3.1, the qMT-MAC protocol devises the PS by examining and prioritizing the flows based on their classification into three categories: Constant Express traffic (CEXP), Express traffic (EXP), and Best Effort traffic (BE). Classification of the packet flows takes place by examination of Layer-2 header fields, such as the \"Ethertype\" field, or the VLAN tag or the source MAC address, denoting the type of equipment that is producing the X-Haul traffic and what class this traffic belongs to. To this end, each qMT-MAC client is considered to contain up to three queues, i.e., one for each traffic category. In qMT-MAC, the nodes transmit their BuS using the ID packets to the CO prior to the initiation of the DATA-TX phase, as done in the gMT-MAC, with the difference being that, in the proposed qMT-MAC, they transmit the kind of traffic as well (CEXP, EXP, or BE). Hence, in qMT-MAC, the CO knows not only the number of packets each node has, but also receives their classification to the three aforementioned traffic categories. The above functionality is shown in Figure 1, where the qMT-MAC nodes are providing access to a set of RUs and WiFi AP devices, with each device producing a different kind of traffic (RUs being 5G FH equipment producing either CEXP or EXP traffic, whereas WiFi APs produce BE traffic). qMT-MAC operates in a slotted time base, with the slot duration set so as to adhere to the transmission delay of an ETH Maximum Transmission Unit (MTU) of 1500 bytes plus 18 header bytes, resulting in the maximum frame size of 1518 bytes. The creation of the qMT-MAC PS takes place in four stages, as depicted in Figure 4:  
* The first stage targets scheduling and combining the CEXP packets in such a pattern that the delay jitter, i.e., the interval between any two consecutive packets of the same CEXP flow, is ideally zero without producing conflicts amongst the different CEXP flows. Since CEXP traffic is CBR in nature, the CEXP transmission schedule is calculated once the CEXP nodes have been identified and their allocation in the PS is copied into every subsequent SF. * The second stage inserts EXP packets in the remaining empty slots after the inclusion of the CEXP packets in the PS. The EXP packets are sequenced in a Round Robin fashion so that the delay is distributed evenly among the different EXP queues that are of the same priority. EXP packets that did not fit into the current SF will be inserted in the PS of the next SF. * During the third stage, the BE packets are inserted into the remaining empty slots of the PS (if any) in a sequential manner, i.e., BE packets are grouped in the PS based on their MAC address or, equivalently, their originating queue. The latter sequencing follows a method to potentially have contiguous BE slots addressing the same qMT-MAC client. This functionality allows the qMT-MAC to implement advanced EXP packet priority policies, such as pre-emption, which are detailed later in the section. BE packets that did not fit into the current SF will be inserted in the PS of the next SF. * During the fourth stage, the remaining empty slots in the PS (if any) are released for BE packet transmission even if there are no more pending BE packets after the third stage. Again, these added BE slots are placed in a sequential manner for the same reason as explained in the third stage. The insertion and prioritization of the CEXP traffic is based on the CEXP-Fit algorithm presented in Table 1.  
The CEXP-Fit algorithm.