## 1 Introduction and motivation  
Real-time (RT) applications such as those relevant to traffic monitoring and management in smart cities [1, 2, 3, 4, 5], safe operation in smart factories [6, 7, 8, 9, 10, 11], and automated driving [12, 13] pose very challenging requirements on the communications, especially in terms of time and safety constraints. Ethernet has always been one of the most investigated technologies for RT communications, in particular for industrial, avionic, and automotive scenarios [14, 15, 16, 17]. Nowadays, Automotive Ethernet is the unanimously recognized solution to reduce the number of heterogeneous communication technologies currently used for in-vehicle communications. Ethernet is an appealing solution to provide RT flows with high bandwidth (e.g., from 10 Mbps, 100 Mbps, 1 Gbps, 2.5 Gbps, 5 Gbps, up to 10 Gbps) and temporal guarantees on the end-to-end frame delays. To guarantee predictability to RT communications over Ethernet, the main aspects to deal with are (i) how to prevent collisions and (ii) how to limit the effect of the interfering traffic (i.e., best-effort traffic) on RT flows, so that the latter ones can be provided with guaranteed bounded delays. While the first obstacle can be removed by adopting a full-duplex Switched Ethernet with microsegmentation, the second issue still remains. In fact, Switched Ethernet was originally devised to support best-effort (BE) traffic, and, consequently, no mechanisms were provided to distinguish between time-critical and BE flows, to reserve bandwidth to time-critical flows, and to limit the interfering flows that share the channel with the RT ones. For this reason, plain Switched Ethernet, although offering multiple levels of quality of service thanks to the Virtual Local Area Network (VLAN) tag, was not able to provide bounded latency to RT traffic. In the past, to overcome this problem, traffic shaping techniques were proposed to limit the interference of BE traffic on RT flows. In particular, traffic smoothing techniques based on a token-bucket mechanism controlled by fuzzy rules [18], further improved with genetic algorithms and multiobjective optimization [19], proved to be very effective to reduce the statistical end-to-end delay of RT frames in industrial communications. A further significant step forward in RT communications over Ethernet networks was the IEEE Audio Video Bridging (AVB) family of standards. AVB introduced (i) a common notion of time, through protocols to manage the network time and support synchronized operations [20], (ii) bandwidth reservation, through the Stream Reservation Protocol (SRP) [21], and (iii) differentiated service for RT and BE traffic, through prioritization and Credit-Based Shaping (CBS) [22] applied to the output ports of bridges and end nodes to prevent traffic bursts. The rationale behind the Qav and Qat standards is that the traffic flows that require bounded latency, here called Stream Reservation (SR) flows, are assigned to specific traffic classes called SR classes. Multiple SR classes are possible, but the actual numbers for configuring the classes, which are given in the Qav standard, refer to Class A and Class B only. Such classes are guaranteed bounded delays over seven hops in the network. The SR flows are reserved bandwidth in advance, but to be provided with guaranteed upper bounds on the frame end-to-end delays, they need to adhere to some per-class configuration rules. Such rules, defined in the form of Traffic Specifications (TSpecs), are defined in the IEEE 802.1 Qav [22] standard (now part of the IEEE 802.1Q [23] since 2014). For each SR class, the TSpecs cap both the maximum frame size and the maximum number of frames belonging to the class that can be sent in a given time interval, called a class measurement interval.