TSN Frame Preemption Testing: Creating a ‘Green Channel’ for Data Transmission

Introduction:

In complex and dynamic fields such as automotive and industrial control, the timeliness and determinism of data transmission are crucial. In scheduling shaping mechanisms like TAS or CQF, different priority services are mapped to different queues, ensuring that high-priority services are not interfered with by low-priority services during transmission, thus guaranteeing end-to-end low latency and deterministic transmission for high-priority services such as industrial control.

However, the service time for high-priority queues is limited and needs to be periodically “opened” and “closed” to allow other types of services to be transmitted. On one hand, if high-priority services are in a “closed” state, they must wait in the queue, increasing their waiting latency; on the other hand, at the moment of switching from low-priority queue service time to high-priority queue service time, if there are data frames being sent from the low-priority queue, to keep the link fully available for high-priority queue data transmission, the data frames in the high-priority queue must wait a certain amount of time before they can be sent, which poses a risk of low-priority inversion.

To ensure that high-priority services can reach their targets quickly and accurately, TSN (Time-Sensitive Networking) frame preemption technology has emerged, creating a “green channel” for data transmission, allowing critical information to flow smoothly through congested networks.

1. Principle of Frame Preemption Technology

The working principle of frame preemption technology is akin to an “emergency lane” on a road. During data transmission, high-priority fast frames (Express Frames) can interrupt the transmission of low-priority preemptible frames (Preamble Frames) and continue to complete the transmission of the remaining preemptible frame slices after the fast frame has been sent.

To implement frame preemption functionality, IEEE802.3br defines new MAC functional interfaces, namely fast MAC (express MAC, eMAC) and preemptible MAC (preamble MAC, pMAC). Additionally, IEEE802.3br defines new MAC sublayer functionalities for interruption, segmentation, and reassembly, known as the MAC Merge Sublayer..

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Figure 1: MAC sublayer model supporting frame preemption

According to the different MAC interfaces, two types of data frames are defined: data frames processed by eMAC are called fast frames (Express Frames), representing high-priority frames; while data frames processed by pMAC are called preemptible frames (Preamble Frames), representing low-priority frames or ordinary frames.

At the sender, the MAC Merge Sublayer is responsible for encapsulating, verifying, and counting multiple segments of preemptible frames. Preemptible frames can be transmitted in one or more data segments, and multiple segments of preemptible frame data may be interspersed with fast frames. The multiple segments of preemptible frames interrupted by fast frames are reassembled at the receiving end’s MAC Merge Sublayer and submitted as complete data frames. The frame preemption operation occurs only at the data link layer, and the MAC Merge Sublayer effectively shields related operations from the upper layers and physical layer, thus not affecting protocols at other layers. This allows high-priority services to complete transmission quickly in a short time, greatly improving the timeliness and determinism of data transmission.

2. Data Packet Format for Frame Preemption

Since the MAC Merge Sublayer has the capability to split and reassemble data packets of different types of service flows, IEEE802.3br defines the data packet format for the MAC Merge Sublayer, referred to as mPacket, which can carry the following data:

① A complete fast frame;

② A complete preemptible frame;

③ The initial data segment of a preemptible frame;

④ Continuous data segments of a preemptible frame;

Unlike the standard Ethernet frame format, mPacket requires tagging for fast frames and preemptible frames, and different data segments of preemptible frames also need to be tagged. Therefore, IEEE802.3br defines two types of mPacket formats, namely the first type mPacket format and the second type mPacket format.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Figure 2: Types of data packet formats supporting frame preemption

Among them, the first type mPacket format is mainly used for complete fast frames, complete preemptible frames, or the initial data segments of preemptible frames. The second type mPacket format is mainly used for continuous data segments of preemptible frames.

mPacketType

SMDTag

Segment Counter

SMDField Value

Validation Data Frame

SMD-V

0X07

Response Data Frame

SMD-R

0X19

Fast Data Frame

SMD-E

0XD5

Initial Data Segment of Preemptible Data Frame

SMD-S0

0

0XE6

SMD-S1

1

0X4C

SMD-S2

2

0X7F

SMD-S3

3

0XB3

Continuous Data Segments of Preemptible Data Frame

SMD-C0

0

0X61

SMD-C1

1

0X52

SMD-C2

2

0X9E

SMD-C3

3

0X2A

3. Necessity of Frame Preemption Function Testing

In Time-Sensitive Networks (TSN), frame preemption technology provides low-latency and high-determinism transmission guarantees for critical data (such as in industrial control and vehicle networking scenarios) by allowing high-priority services to interrupt low-priority services. However, the efficient operation of this mechanism relies on devices strictly adhering to protocol standards and reliably adapting to complex network environments. Therefore, testing the frame preemption functionality is crucial.

Firstly, testing can verify whether devices accurately implement the functionalities required by IEEE 802.1Qbu and IEEE 802.3br standards, such as immediate preemption of high-priority frames, slicing and reassembly of low-priority frames, ensuring interoperability and protocol compatibility across vendor devices.

Secondly, by simulating abnormal scenarios such as network congestion, data segment loss, or checksum errors, testing can assess the fault tolerance of devices under failure conditions, for example, whether they can correctly discard invalid data segments when detecting erroneous mCRC, thus preventing low-priority data from interfering with high-priority service transmission.

Additionally, testing can quantify device performance in terms of real-time capability, bandwidth utilization, and priority scheduling efficiency, providing data support for optimizing network configurations. For instance, using the Xintai TSN network tester, developers can accurately analyze the slicing and reassembly efficiency of devices under mixed traffic, diagnose potential bottlenecks, and ensure their stability and reliability in complex industrial environments.

In summary, frame preemption function testing is not only a necessary verification step for technology implementation but also a core means to enhance network determinism and ensure the quality of critical service delivery.

4. Frame Preemption Function Testing Methods

Typical testing topologies for frame preemption function testing include two types: frame preemption slicing capability testing and slicing synthesis capability testing.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Figure 3: Schematic diagram of frame preemption protocol slicing capability testing topology

As shown in Figure 3, this testing scenario mainly focuses on verifying the DUT’s MAC sublayer interruption and segmentation capabilities. The test constructs a parallel transmission model of fast frames and preemptible frames, with the tester simultaneously sending fast frames and preemptible frames to the DUT switch. The DUT must slice low-priority frames based on the IEEE 802.3br standard through the preemptible MAC (pMAC), allowing high-priority fast frames to preempt the link. The receiving end collects Port Qbu data to observe the forwarding status of preemptible frame segments, while capturing packets to analyze the slicing format (such as SMD tags, segment counters, etc.), ensuring that the DUT can dynamically interrupt preemptible frames and insert fast frames, and that the slicing tags are consistent with protocol requirements, thus verifying protocol compatibility and the effectiveness of the slicing mechanism.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Figure 4: Schematic diagram of frame preemption protocol slicing synthesis capability testing topology

As shown in Figure 4, this testing scenario aims to verify the DUT’s MAC Merge Sublayer reassembly capability. The test constructs a mixed transmission model of fast frames and preemptible frames, with the tester sending mixed traffic to the DUT switch. The DUT must identify and reassemble preemptible frame segments based on mPacket tags (such as SMD-S0/S1 for initial segments and SMD-C0/C1 for continuous segments) to restore complete data frames. The receiving end confirms the DUT’s protocol compliance by counting the number of valid restored packets and capturing the reassembled preemptible frames.

5. Reference Configuration for TSN Network Tester

1. Frame Preemption Protocol Slicing Capability TestingTSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

The tester simulates TSN terminals through two test ports, constructing fast frame and preemptible frame traffic. The main configuration includes enabling VLAN and setting the VLAN ID to 10, with the fast frame priority set to 7 and the preemptible frame priority set to 0 (priority parameters can be customized as long as the fast frame priority is higher than the preemptible frame), as shown in the figure below.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

The tester simultaneously sends fast frames and preemptible frames from the two test ports to the DUT. By checking the Port Qbu Statistic, it can be observed that the preemptible frames have been sliced and forwarded. This verifies the effectiveness of the DUT’s interruption and segmentation capabilities regarding pMAC at the MAC sublayer.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission2. Frame Preemption Protocol Reassembly Capability TestingTSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

The tester constructs mixed traffic of fast frames and preemptible frames through one test port.

Configure fast frame traffic. According to the testing environment, enable VLAN and set the VLAN ID to 10, with a priority of 7, as shown in the figure below.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Configure preemptible frame slicing traffic. Enable VLAN and set the VLAN ID to 10, with a priority of 0. Additionally, add multiple groups of segmented packets, with segment lengths that can be set to increase, decrease, or random sizes as needed.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

The tester sends the mixed traffic to the DUT, and by checking the Port Qbu Statistic, it can be observed the total number of fast packets, the total number of valid fast packets, and the total number of normally restored packets. This verifies the effectiveness of the DUT’s reassembly capabilities regarding pMAC at the MAC sublayer.

At the traffic receiving port, captured packets can show the preemptible frame data that has been reassembled and forwarded.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Simultaneously, during this process, some fault injection tests can be conducted, such as constructing mCRC checksum errors, preamble errors, etc., to verify whether the DUT’s handling mechanism meets the requirements when faults occur. For example, after introducing an mCRC error in one of the preemptible frame data segments, the frame preemption mechanism will check the integrity of the data segment, and in the case of mPacket transmission errors, all mPacket frames of that preemptible segment will be discarded.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

6. Xintai TSN Network Tester

Time-Sensitive Networking (TSN) possesses technical advantages of high bandwidth, universal Ethernet protocols, and precise network KPI control, meeting the increasingly digitalized and intelligent technical demands of industrial networks. TSN has reached a consensus in the industry as the direction of the next generation of industrial network technology evolution. A powerful and professional testing tool is essential for the maturity and widespread adoption of any technology.

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

The Xintai BigTao220 portable test chassis is a new generation of R&D testing chassis launched by the company. It adopts a modular design, providing 2 slots that support a variety of testing modules from 10M to 800G (including TSN testing modules) for arbitrary combinations, offering TSN protocol testing solutions for automotive Ethernet and industrial Ethernet.

END

Author: Chen Zhitang

Layout: Marketing Department

If you need more information, please feel free to contact us

Product Consultation Hotline:010-82349338

TSN Frame Preemption Testing: Creating a 'Green Channel' for Data Transmission

Leave a Comment