The Linux TSN Testbench
is a real-time and non-real time traffic validation
tool for converged TSN networks. PROFINET as well as OPC/UA PubSub and other
configurable protocols are supported. Furthermore, the performance validation of
security algorithms can be utilized. The evaluation application is primarily
used to simulate a PLC. It generates RT and non-RT traffic, mirrors traffic and
performs consistency and latency checks. The Linux TSN Testbench
is split
into two applications:
reference
: Traffic generation and checking simulationmirror
: Traffic mirror application for traffic generated byreference
application
The concept is shown below.
Over the last years the Linux kernel and open source ecosystem in general introduced TSN functionalities. This includes the time synchronization with PTP via 802.1AS, various traffic shapers defined by IEEE and deterministic frame reception and transmission. Furthermore, the PREEMPT_RT patch turns Linux into a real-time Operating-System. How well do these mechanisms perform for real world use cases? For instance, is it possible to run PROFINET over TSN on top of Linux? Which jitter, cycle times, throughputs and latencies can be achieved?
To answer these questions, the Linux TSN Testbench
has been developed. The
purpose of that tool is to evaluate manufacturer’s hardware as well as
underlying drivers and the Linux network stack itself. Thereby, please note that
is not a TSN conformance testing tool, it is intended for evaluation. The tool
itself is independent of any hardware manufacturers. All used TSN mechanisms are
utilizing mainline Linux only utilities for data and control plane.
While the development of the tool started for PROFINET RT and later TSN, it is
now able to generate any kind of cyclic Ethernet payload. This way, different
middlewares
next to PROFINET such as OPC/UA can be simulated and tested.
The overall idea is shown below.
The application itself performs cyclic Ethernet communication. There are
different traffic classes ranging from real time Layer 2 up to UDP
communication. The cyclic receivers and transmitters utilize either traditional
AF_PACKET
or modern AF_XDP
sockets. For both socket types the receive
flow is configured via either BPF filters or eBPF XDP programs. Based on the
configuration, or profiles, the Linux TSN Testbench
can simulate different
traffic types such as PROFINET or OPC/UA PubSub. The image below shows an
example of three different middlewares in combination with non-real time
applications utilizing XDP.
Project home: https://github.com/Linutronix/TSN-Testbench
Project documentation: https://linutronix.github.io/TSN-Testbench
Contribution: See CONTRIBUTING
This project is maintained by: Linutronix
Linux TSN Testbench
features include:
- Real-time and non-real time protocols
- Configurable traffic class mapping
- Configurable cycle time, frames, frame size, vid
- Real-time security support with configurable algorithms like AES256
- Multiple middleware simulation like PROFINET and OPC/UA
- Usage of PTP for time synchronization
- Flexible Linux Ethernet interface usage like XDP, XDP/ZC, AF/PACKET, busy polling
- End station Qbv
The following list contains ideas for further development:
- Add interface for workload emulation
- Add support for XDP and Tx Launch Time
- Add configurations for other hardware platforms (hybrid!) and NIC(s)
- Add debugging capabilities on
mirror
side - Add Wireshark dissector for MetaData
- Add analyzer scripts for Profishark captures
- Add integration with
ClockManager
- Extend statistics with hardware timestamps
- Make it more user friendly
- Improve documentation
- Test (virtual) container networking
- Test short cycle times (<= 250us)
- Test 10G+ NIC(s) especially wrt to IPG
- Package for Debian
The documentation includes information on how to build, use and run the Linux
TSN Testbench
. The documentation is available at
https://linutronix.github.io/TSN-Testbench
Idea and initial funding by Phoenix Contact Electronics GmbH
Supported by Siemens AG and Intel Corporation
Copyright (C) 2020-2024 Linutronix GmbH
Copyright (C) 2024 Intel Corporation
BSD-2 Clause and Dual BSD/GPL for all eBPF programs