systemd Network Manager TSN Endstation Configuration for Intel® Ethernet Controllers¶
Intel® ECI TSN Endstation introduces IEEE 802.1AS and IEEE 802.1Q-2018-EST (for example, Virtual LANs (VLANs), Earliest TxTime First (NET_SCHED_ETF) QDisc and Time Aware Priority (NET_SCHED_TAPRIO) QDisc) as systemd
runtime services.
Intel® ECI makes generic assumptions that all Linux TSN Endstation settings shall be managed using Linux distribution systemd Network Manager standard configurations rules for achieving IEEE 802.1Q-EST interoperability:
Attention
Intel® ECI maintains both feature backports and new Earliest TxTime First (NET_SCHED_ETF) QDisc and Time Aware Priority (NET_SCHED_TAPRIO) QDisc contribution for major Linux Debian 12 (Bookworm) , Canonical® Ubuntu® 22.04 (Jammy Jellyfish) and Red Hat Enterprise Linux 9 maintained packages, but all distribution support is on the way to upstream.
The following section is applicable to:

Setup the ECI repository, then run the following commands to install this component:
Install from individual Deb package
Install TSN Endstation IEEE 802.1AS and IEEE 802.1Q-2018-EST systemd
unit runtime service tsn-endstation-timesync
and tsn-endstation-netlink
:
sudo apt install tsn-endstation-netlink
For example, on Debian distribution set with ECI repository, the following should be displayed:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
Need to get 19.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main amd64 iotg-gptp-configs amd64 0.9.13-0eci4 [4848 B]
Get:2 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main amd64 tsn-endstation-init all 3.2-2 [3996 B]
Get:3 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main amd64 tsn-endstation-netlink all 3.2-2 [6368 B]
Get:4 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main amd64 tsn-endstation-timesync all 3.2-2 [4572 B]
Fetched 19.8 kB in 0s (1570 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 115190 files and directories currently installed.)
Preparing to unpack .../iotg-gptp-configs_0.9.13-0eci4_amd64.deb ...
Unpacking iotg-gptp-configs (0.9.13-0eci4) over (0.9.13-0eci4) ...
Preparing to unpack .../tsn-endstation-init_3.2-2_all.deb ...
Unpacking tsn-endstation-init (3.2-2) over (3.2-2) ...
Preparing to unpack .../tsn-endstation-netlink_3.2-2_all.deb ...
Unpacking tsn-endstation-netlink (3.2-2) over (3.2-2) ...
Preparing to unpack .../tsn-endstation-timesync_3.2-2_all.deb ...
Unpacking tsn-endstation-timesync (3.2-2) over (3.2-2) ...
Setting up iotg-gptp-configs (0.9.13-0eci4) ...
Setting up tsn-endstation-init (3.2-2) ...
Setting up tsn-endstation-timesync (3.2-2) ...
Setting up tsn-endstation-netlink (3.2-2) ...
Install from individual RPM package
Install TSN Endstation IEEE 802.1AS and IEEE 802.1AS via systemd
unit tsn-endstation-timesync
and tsn-endstation-netlink
runtime service:
sudo dnf install tsn-endstation-netlink
For example, on Red Hat Enterprise Linux 9 distribution set with ECI repository, the following should be displayed:
Updating Subscription Management repositories.
Last metadata expiration check: 3:08:06 ago on Thu 04 Apr 2024 06:21:25 AM EDT.
Dependencies resolved.
======================================================================================================================================================================================================================================
Package Architecture Version Repository Size
======================================================================================================================================================================================================================================
Reinstalling:
tsn-endstation-init noarch 3.2-2.el9 eci-el9-rpm-noarch 10 k
tsn-endstation-netlink noarch 3.2-2.el9 eci-el9-rpm-noarch 17 k
tsn-endstation-timesync noarch 3.2-2.el9 eci-el9-rpm-noarch 12 k
Transaction Summary
======================================================================================================================================================================================================================================
Total download size: 39 k
Installed size: 47 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): tsn-endstation-timesync-3.2-2.el9.noarch.rpm 1.7 MB/s | 12 kB 00:00
(2/3): tsn-endstation-init-3.2-2.el9.noarch.rpm 1.1 MB/s | 10 kB 00:00
(3/3): tsn-endstation-netlink-3.2-2.el9.noarch.rpm 1.6 MB/s | 17 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.2 MB/s | 39 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Reinstalling : tsn-endstation-init-3.2-2.el9.noarch 1/6
Reinstalling : tsn-endstation-timesync-3.2-2.el9.noarch 2/6
Reinstalling : tsn-endstation-netlink-3.2-2.el9.noarch 3/6
Cleanup : tsn-endstation-netlink-3.2-2.el9.noarch 4/6
Cleanup : tsn-endstation-timesync-3.2-2.el9.noarch 5/6
Cleanup : tsn-endstation-init-3.2-2.el9.noarch 6/6
Running scriptlet: tsn-endstation-init-3.2-2.el9.noarch 6/6
Verifying : tsn-endstation-init-3.2-2.el9.noarch 1/6
Verifying : tsn-endstation-init-3.2-2.el9.noarch 2/6
Verifying : tsn-endstation-netlink-3.2-2.el9.noarch 3/6
Verifying : tsn-endstation-netlink-3.2-2.el9.noarch 4/6
Verifying : tsn-endstation-timesync-3.2-2.el9.noarch 5/6
Verifying : tsn-endstation-timesync-3.2-2.el9.noarch 6/6
Installed products updated.
Reinstalled:
tsn-endstation-init-3.2-2.el9.noarch tsn-endstation-netlink-3.2-2.el9.noarch tsn-endstation-timesync-3.2-2.el9.noarch
Complete!
Check the Intel ECI systemd-networkd
packages upgrade with Earliest TxTime First (NET_SCHED_ETF) QDisc and Time Aware Priority (NET_SCHED_TAPRIO) QDisc features:
Install from meta-package
$ sudo apt-cache policy systemd
For example, on Debian distribution set with ECI repository, the following should be displayed:
systemd:
Installed: 252.22-1~deb12u1-bookworm+etf+taprio+mqprio+fpe+ffw-r5
Candidate: 252.22-1~deb12u1-bookworm+etf+taprio+mqprio+fpe+ffw-r5
Version table:
*** 252.22-1~deb12u1-bookworm+etf+taprio+mqprio+fpe+ffw-r5 100
100 /var/lib/dpkg/status
252.22-1~deb12u1-ecir5+etf+taprio+mqprio+fpe+ffw 500
500 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main amd64 Packages
252.22-1~deb12u1 500
500 http://deb.debian.org/debian bookworm/main amd64 Packages
if Installed:
is displayed differently you need to manually install :
$ sudo apt install systemd=252.22-1~deb12u1-bookworm+etf+taprio+mqprio+fpe+ffw-r5
systemd-networkd
patchset for 252.22-1~deb12u1-bookworm+etf+taprio+mqprio+fpe+ffw-r5
are available from the APT repository deb-src
:
$ sudo apt source systemd
$ ls -l systemd-252.22-1~deb12u1/debian/patches/00*.patch
Reading package lists... Done
Need to get 13.5 MB of source archives.
Get:1 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main systemd 252.22-1~deb12u1-ecir5+etf+taprio+mqprio+fpe+ffw (dsc) [5565 B]
Get:2 http://wheeljack.ch.intel.com/apt-repos/ECI/bookworm isar/main systemd 252.22-1~deb12u1-ecir5+etf+taprio+mqprio+fpe+ffw (tar) [13.5 MB]
10% [2 systemd 1202 B/13.5 MB 0%]
46% [2 systemd 6089 kB/13.5 MB 45%]
Fetched 13.5 MB in 1s (11.7 MB/s)
dpkg-source: info: extracting systemd in systemd-252.22-1~deb12u1
dpkg-source: info: unpacking systemd_252.22-1~deb12u1-ecir5+etf+taprio+mqprio+fpe+ffw.tar.gz
-rw-r--r-- 1 root root 23730 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0001-network-tc-introduce-ETF-Earliest-TxTime-First-Qdisc.patch
-rw-r--r-- 1 root root 63457 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0002-network-tc-introduce-Time-Aware-Priority-Shaper-TAPR.patch
-rw-r--r-- 1 root root 18986 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0003-network-tc-introduce-Multiqueue-Priority-Shaper-MQPR.patch
-rw-r--r-- 1 root root 3698 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0004-link-Add-tc-and-l2-fwd-offload-features.patch
-rw-r--r-- 1 root root 1021 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0005-vlan-remove-ingress-egress-qos-maps-exclusion.patch
-rw-r--r-- 1 root root 9256 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0006-network-taprio-support-for-preemption-parameter.patch
-rw-r--r-- 1 root root 7331 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0007-link-set-device-EEE-behaviour.patch
-rw-r--r-- 1 root root 60321 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0008-link-Add-ethtool-rx-nfc-flow-type-filters.patch
-rw-r--r-- 1 root root 8618 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0009-link-Add-ethtool-set-frame-preemption.patch
-rw-r--r-- 1 root root 86249 Jan 26 21:49 systemd-252.22-1~deb12u1/debian/patches/0010-network-add-support-for-configuring-TC-filters.patch
Important
Red Hat Enterprise Linux 9 distribution ONLY provides Earliest TxTime First (NET_SCHED_ETF) QDisc and Time Aware Priority (NET_SCHED_TAPRIO) QDisc Traffic-Class features on kernel-rt-5.14.0-???.el9.x86_64.rpm packages
Install from individual RPM package
$ sudo dnf list systemd-networkd systemd-udev --showduplicates
For example, on Red Hat Enterprise Linux 9 distribution set with ECI repository, the following should be displayed:
Installed Packages
systemd-networkd.x86_64 253.4-1eci1.el9 @eci-el9-rpm-x86_64
systemd-udev.x86_64 252-18eci1.el9 @eci-el9-rpm-x86_64
Available Packages
systemd-networkd.x86_64 253.4-1eci1.el9 eci-el9-rpm-x86_64
systemd-networkd.x86_64 253.4-1.el9 epel
systemd-udev.x86_64 250-6.el9_0 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 250-6.el9_0.1 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 250-12.el9_1 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 250-12.el9_1.1 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 250-12.el9_1.3 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 252-13.el9_2 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 252-14.el9_2.1 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 252-14.el9_2.3 rhel-9-for-x86_64-baseos-rpms
systemd-udev.x86_64 252-18eci1.el9 eci-el9-rpm-x86_64
systemd-udev.x86_64 252-18.el9 rhel-9-for-x86_64-baseos-rpms
if Installed Packages
is displayed differently you need to manually install :
$ sudo dnf install systemd-networkd-253.4-1eci1.el9 systemd-udev-252-18eci1.el9
systemd-networkd
patchset for 253.4-1eci1.el9
are available from the ECI DNF repository src.rpm
:
$ sudo dnf download --source systemd-networkd-253.4-1eci1.el9
$ mkdir systemd-extras-253.4
$ cd systemd-extras-253.4 && rpm2cpio ../systemd-extras-253.4-1eci1.el9.src.rpm | cpio -i && cd -
$ ls -l systemd-extras-253.4/94*.patch
Updating Subscription Management repositories.
...
systemd-extras-253.4-1eci1.el9.src.rpm 78 MB/s | 11 MB 00:00
23888 blocks
-rw-r--r--. 1 root root 23219 Apr 4 11:24 9401-network-tc-introduce-ETF-Earliest-TxTime-First-Qdisc.patch
-rw-r--r--. 1 root root 62296 Apr 4 11:24 9402-network-tc-introduce-Time-Aware-Priority-Shaper-TAPR.patch
-rw-r--r--. 1 root root 18524 Apr 4 11:24 9403-network-tc-introduce-Multiqueue-Priority-Shaper-MQPR.patch
-rw-r--r--. 1 root root 85620 Apr 4 11:24 9404-network-add-support-for-configuring-TC-filters.patch
eci-ethirqs@.service
- Networking Interrupts CPU Affinity for Intel® Ethernet Controllers¶
Intel® Ethernet Controllers can provide several MSI interrupts to improve the network throughput.
Intel® ECI makes generic assumptions that traffic-class prioritization is achieved on cores (for example, real-time communication tasks) other than default core 0 (for example, house-keeping tasks) than Network Interrupts Affinity to CPU critical Ethernet device interrupts
This section describes how to selectively map MSI interrupts to particular CPU cores for each particular Intel® Ethernet Controller using systemctl
.
The following section is applicable to:
Identify the available Intel® Industrial Ethernet Controllers:
$ lspci -nnn | grep "Ethernet controller"
In this example, the output pattern is
${device_id} ${description}
, where${device_id}
is01:00.0
.Important
Identify the Intel® Industrial Ethernet Controller interface that is wired to the TSN switch device or to another TSN end-station:
[Endpoint PCI
8086:7aac
and8086:7aad
] 12th Gen Intel® Core™ S-Series [Alder Lake] Ethernet GbE Time-Sensitive Network Controller[Endpoint PCI
8086:a0ac
] 11th Gen Intel® Core™ U-Series and P-Series [Tiger Lake] Ethernet GbE Time-Sensitive Network Controller[Endpoint PCI
8086:4b32
and8086:4ba0
] Intel® Atom™ x6000 Series [Elkhart Lake] Ethernet GbE Time-Sensitive Network Controller[Endpoint PCI
8086:15f2
] Intel® Ethernet Controller I225-LM for Time-Sensitive Networking (TSN)[Endpoint PCI
8086:125b
] Intel® Ethernet Controller I226-LM for Time-Sensitive Networking (TSN)[Endpoint PCI
8086:157b
,8086:1533
,…] Intel® Ethernet Controller I210-IT for Time-Sensitive Networking (TSN)
Confirm the Linux network interface name of the Intel® Industrial Ethernet Controllers:
$ networkctl status enp1s0
The expected output should be similar to the following, with the default
51-wired-dhcp.network
and99-default.link
networkd
and udev rules setting:root@eci-intel-23f0:~# networkctl status enp1s0 ? 5: enp1s0 Link File: /usr/lib/systemd/network/99-default.link Network File: /usr/lib/systemd/network/51-wired-dhcp.network Type: ether State: routable (configured) Path: pci-0000:01:00.0 Driver: igc Vendor: Intel Corporation Model: Ethernet Controller I225-LM HW Address: 00:a0:c9:00:00:00 (Intel Corporation) MTU: 1500 (min: 68, max: 9216) QDisc: mq IPv6 Address Generation Mode: eui64 Queue Length (Tx/Rx): 4/4 Auto negotiation: yes Speed: 1Gbps Duplex: full Port: tp Address: 10.10.10.19 (DHCP4 via 10.10.10.1) fe80::2a0:c9ff:fe00:0 Gateway: 10.10.10.1 (ALFA, INC.) DNS: 10.10.10.1 DHCP4 Client ID: IAID:0x56504d98/DUID DHCP6 Client DUID: DUID-EN/Vendor:0000ab11983c97c412262c820000 Connected To: cyclone5 on port 1c:a0:d3:20:06:1a (CE03) eci-intel-23f0 systemd-networkd[328]: enp1s0: Gained carrier eci-intel-23f0 systemd-networkd[328]: enp1s0: DHCPv4 address 10.10.10.19/24 via 10.10.10.1 eci-intel-23f0 systemd-networkd[328]: enp1s0: Lost carrier eci-intel-23f0 systemd-networkd[328]: enp1s0: DHCP lease lost eci-intel-23f0 systemd-networkd[328]: enp1s0: DHCPv6 lease lost eci-intel-23f0 systemd-networkd[328]: enp1s0: Gained carrier eci-intel-23f0 systemd-networkd[328]: enp1s0: Lost carrier eci-intel-23f0 systemd-networkd[328]: enp1s0: DHCPv6 lease lost eci-intel-23f0 systemd-networkd[328]: enp1s0: Gained carrier eci-intel-23f0 systemd-networkd[328]: enp1s0: DHCPv4 address 10.10.10.19/24 via 10.10.10.1
The output text is the interface name of i225 NIC, marked as
${interface_name}
.Enable, start, and report the Intel® Industrial Ethernet Controller MSI interrupts affinity CPU cores for the particular Linux network interface name:
$ systemctl enable eci-ethirqs@enp1s0.service && systemctl start eci-ethirqs@enp1s0.service && systemctl status eci-ethirqs@enp1s0.service
The expected output should be similar to the following:
Created symlink /etc/systemd/system/multi-user.target.wants/eci-ethirqs@enp1s0.service ? /lib/systemd/system/eci-ethirqs@.service. ● eci-ethirqs@enp1s0.service - ECI: set CPU core to IRQ Ethernet device affinity Loaded: loaded (/usr/lib/systemd/system/eci-ethirqs@.service; enabled; preset: disabled) Active: active (exited) since Thu 2024-04-04 10:15:47 EDT; 14ms ago Process: 911074 ExecStartPost=systemctl daemon-reload (code=exited, status=0/SUCCESS) Main PID: 910992 (code=exited, status=0/SUCCESS) CPU: 129ms Apr 04 10:15:47 localhost.localdomain systemd[1]: Starting ECI: set CPU core to IRQ Ethernet device affinity... Apr 04 10:15:47 localhost.localdomain bash[910963]: set isolcpu to online cpu1 Apr 04 10:15:47 localhost.localdomain network-irq-affinity[910992]: network-irq-affinity: Assigning enp1s0-TxRx-3 on IRQ 134 to CPU 1 Apr 04 10:15:47 localhost.localdomain network-irq-affinity[910992]: network-irq-affinity: Assigning enp1s0-TxRx-2 on IRQ 133 to CPU 1 Apr 04 10:15:47 localhost.localdomain network-irq-affinity[910992]: network-irq-affinity: Assigning enp1s0-TxRx-1 on IRQ 131 to CPU 1 Apr 04 10:15:47 localhost.localdomain network-irq-affinity[910992]: network-irq-affinity: Assigning enp1s0-TxRx-0 on IRQ 130 to CPU 0 Apr 04 10:15:47 localhost.localdomain network-irq-affinity[910992]: network-irq-affinity: Assigning enp1s0 on IRQ 129 to CPU 0 Apr 04 10:15:47 localhost.localdomain systemd[1]: Finished ECI: set CPU core to IRQ Ethernet device affinity.
Confirm whether the interrupt mapping is effective:
$ cat /proc/interrupts | grep enp1s0
The expected output should be similar to the following:
root@eci-intel-3f6c:~# cat /proc/interrupts | grep enp3s0 CPU0 CPU1 CPU2 CPU3 132: 2508 0 0 0 IR-PCI-MSI 524288-edge enp1s0 133: 876072 0 0 0 IR-PCI-MSI 524289-edge enp1s0-TxRx-0 134: 165157 4380 0 0 IR-PCI-MSI 524290-edge enp1s0-TxRx-1 135: 165136 626 0 0 IR-PCI-MSI 524291-edge enp1s0-TxRx-2 136: 164913 617 0 0 IR-PCI-MSI 524292-edge enp1s0-TxRx-3
eci-ptp4l-p2p@.service
- gPTP Time Synchronization Service for Intel® Ethernet Controllers¶
This section describes how to selectively enable IEEE 802.1as gPTP Profile Essential for each particular Intel® Ethernet Controller type using systemctl
.
Generalized Precision Time Protocol (gPTP) is designed specifically for industrial control systems and is optimal for use in distributed systems because it requires minimal bandwidth and very little CPU processing overhead.
An IEEE 802.1AS capable TSN domain is made up of gPTP enabled Ethernet endpoints and switches.
The following animation illustrates the PTP clocks in a primary and secondary Ethernet port hierarchy within a TSN domain.
The following section is applicable to:
Set up Intel® Ethernet Controllers according to eci-ethirqs@.service- Networking Interrupts CPU Affinity for Intel® Ethernet Controllers.
Enable, start, and report the Intel® Industrial Ethernet Controllers IEEE 802.1AS on the particular Linux network interface name:
$ systemctl enable eci-ptp4l-p2p@enp1s0.service && systemctl start eci-ptp4l-p2p@enp1s0.service && systemctl status eci-ptp4l-p2p@enp1s0.service
The expected output should be similar to the following:
Created symlink /etc/systemd/system/multi-user.target.wants/eci-ptp4l-p2p@enp1s0.service ? /lib/systemd/system/eci-ptp4l-p2p@.service. ● eci-ptp4l-p2p@enp1s0.service - ECI: Precision Time Protocol (PTP) service for enp1s0 Loaded: loaded (/usr/lib/systemd/system/eci-ptp4l-p2p@.service; disabled; preset: disabled) Drop-In: /usr/lib/systemd/system/eci-ptp4l-p2p@.service.d └─10-isolcpu-rt.conf Active: active (running) since Thu 2024-04-04 10:15:47 EDT; 1min 7s ago Docs: man:ptp4l Main PID: 911115 (ptp4l) Tasks: 1 (limit: 195210) Memory: 372.0K CPU: 39ms CGroup: /system.slice/system-eci\x2dptp4l\x2dp2p.slice/eci-ptp4l-p2p@enp1s0.service └─911115 ptp4l -i enp1s0 -f /run/eci/ptp4l-enp1s0.conf -ml 6 --step_threshold=1 --socket_priority=2 Apr 04 10:16:50 localhost.localdomain ptp4l[911115]: ptp4l[5100134.055]: rms 2 max 3 freq +1281 +/- 3 delay 8 +/- 0 Apr 04 10:16:50 localhost.localdomain ptp4l[911115]: [5100134.055] rms 2 max 3 freq +1281 +/- 3 delay 8 +/- 0 Apr 04 10:16:51 localhost.localdomain ptp4l[911115]: ptp4l[5100135.055]: rms 2 max 5 freq +1283 +/- 3 delay 8 +/- 0 Apr 04 10:16:51 localhost.localdomain ptp4l[911115]: [5100135.055] rms 2 max 5 freq +1283 +/- 3 delay 8 +/- 0 Apr 04 10:16:52 localhost.localdomain ptp4l[911115]: ptp4l[5100136.055]: rms 2 max 5 freq +1282 +/- 3 delay 8 +/- 0 Apr 04 10:16:52 localhost.localdomain ptp4l[911115]: [5100136.055] rms 2 max 5 freq +1282 +/- 3 delay 8 +/- 0 Apr 04 10:16:53 localhost.localdomain ptp4l[911115]: ptp4l[5100137.055]: rms 2 max 5 freq +1281 +/- 3 delay 8 +/- 0 Apr 04 10:16:53 localhost.localdomain ptp4l[911115]: [5100137.055] rms 2 max 5 freq +1281 +/- 3 delay 8 +/- 0 Apr 04 10:16:54 localhost.localdomain ptp4l[911115]: ptp4l[5100138.055]: rms 2 max 3 freq +1282 +/- 3 delay 9 +/- 0 Apr 04 10:16:54 localhost.localdomain ptp4l[911115]: [5100138.055] rms 2 max 3 freq +1282 +/- 3 delay 9 +/- 0
Attention
You might need to edit Intel® Industrial Ethernet controllers IEEE 802.1AS to match a specific ODM Ethernet PHY configuration available on the the
iotg-gptp-configs
ECI package:$ ls -l /opt/intel/iotg_tsn_ref_sw/common/
Select a gPTP template from the list:
-rw-r--r-- 1 root root 526 Apr 21 2021 gPTP.cfg -rw-r--r-- 1 root root 540 Apr 21 2021 gPTP_RGMII-MV1510-1G.cfg -rw-r--r-- 1 root root 540 Apr 21 2021 gPTP_SGMII-MV2110-1G.cfg -rw-r--r-- 1 root root 543 Apr 21 2021 gPTP_SGMII-MV2110-2_5G.cfg -rw-r--r-- 1 root root 541 Apr 21 2021 gPTP_TI-1G.cfg -rw-r--r-- 1 root root 552 Apr 21 2021 gPTP_i225-1G.cfg
Edit gPTP settings required for certain Ethernet PHY and speed:
$ vi /run/eci/ptp4l-enp1s0.conf # # 802.1AS example configuration containing those attributes which # differ from the defaults. See the file, default.cfg, for the # complete list of available options. # [global] gmCapable 1 priority1 248 priority2 248 logAnnounceInterval 0 logSyncInterval -3 syncReceiptTimeout 3 neighborPropDelayThresh 800 min_neighbor_prop_delay -20000000 assume_two_step 1 path_trace_enabled 1 follow_up_info 1 transportSpecific 0x1 ptp_dst_mac 01:80:C2:00:00:0E network_transport L2 delay_mechanism P2P tx_timestamp_timeout 100
Then, restart to test and review gPTP settings:
$ systemctl restart eci-ptp4l-p2p@enp1s0.service && journalctl -xe -u eci-ptp4l-p2p@enp1s0.service
eci-phc2sys@.service
- PHC Time Synchronization Service for Intel® Ethernet Controllers¶
This section describes how to selectively enable IEEE 802.1as gPTP Profile Essential with CPU time on a particular Intel® Ethernet Controller type using systemctl
.
The following section is applicable to:
Set up Intel® Ethernet controllers according to eci-ptp4l-p2p@.service - gPTP Time Synchronization Service for Intel® Ethernet Controllers.
Enable, start, and report the Intel® Industrial Ethernet Controllers’ PHC time sync on the particular Linux network interface name:
$ systemctl enable eci-phc2sys@enp1s0.service && systemctl start eci-phc2sys@enp1s0.service && systemctl status eci-phc2sys@enp1s0.service
The expected output should be similar to the following:
Created symlink /etc/systemd/system/multi-user.target.wants/eci-phc2sys@enp1s0.service → /lib/systemd/system/eci-phc2sys@enp1s0.service. ● eci-phc2sys@enp1s0.service - ECI: Synchronize system clock or PTP hardware clock (PHC) Loaded: loaded (/usr/lib/systemd/system/eci-phc2sys@.service; disabled; preset: disabled) Drop-In: /usr/lib/systemd/system/eci-phc2sys@.service.d └─10-isolcpu-rt.conf Active: active (running) since Thu 2024-04-04 10:15:47 EDT; 2min 34s ago Docs: man:phc2sys Main PID: 911116 (phc2sys) Tasks: 1 (limit: 195210) Memory: 516.0K CPU: 7ms CGroup: /system.slice/system-eci\x2dphc2sys.slice/eci-phc2sys@enp1s0.service └─911116 phc2sys -s enp1s0 -c CLOCK_REALTIME --step_threshold=1 --transportSpecific=1 -w -ml 7 Apr 04 10:18:17 localhost.localdomain phc2sys[911116]: phc2sys[5100221.064]: CLOCK_REALTIME phc offset -2 s2 freq -3843 delay 0 Apr 04 10:18:17 localhost.localdomain phc2sys[911116]: [5100221.064] CLOCK_REALTIME phc offset -2 s2 freq -3843 delay 0 Apr 04 10:18:18 localhost.localdomain phc2sys[911116]: phc2sys[5100222.064]: CLOCK_REALTIME phc offset -7 s2 freq -3848 delay 0 Apr 04 10:18:18 localhost.localdomain phc2sys[911116]: [5100222.064] CLOCK_REALTIME phc offset -7 s2 freq -3848 delay 0 Apr 04 10:18:19 localhost.localdomain phc2sys[911116]: phc2sys[5100223.064]: CLOCK_REALTIME phc offset -7 s2 freq -3850 delay 0 Apr 04 10:18:19 localhost.localdomain phc2sys[911116]: [5100223.064] CLOCK_REALTIME phc offset -7 s2 freq -3850 delay 0 Apr 04 10:18:20 localhost.localdomain phc2sys[911116]: phc2sys[5100224.064]: CLOCK_REALTIME phc offset -24 s2 freq -3869 delay 0 Apr 04 10:18:20 localhost.localdomain phc2sys[911116]: [5100224.064] CLOCK_REALTIME phc offset -24 s2 freq -3869 delay 0 Apr 04 10:18:21 localhost.localdomain phc2sys[911116]: phc2sys[5100225.064]: CLOCK_REALTIME phc offset -9 s2 freq -3862 delay 0 Apr 04 10:18:21 localhost.localdomain phc2sys[911116]: [5100225.064] CLOCK_REALTIME phc offset -9 s2 freq -3862 delay 0
eci-tsn-wait-sync-8021as@.service
- TSN 802.1AS Services for Intel® Ethernet Controllers¶
This section describes how to selectively wait for IEEE 802.1as gPTP Profile Essential time synchronization on a particular Intel® Ethernet Controller using systemctl
.
The following section is applicable to:
Set up Intel® Ethernet Controllers according to eci-phc2sys@.service - PHC Time Synchronization Service for Intel® Ethernet Controllers.
Enable, start, and wait for SUCCESS status of check_clocks for Intel® Industrial Ethernet Controllers on a particular Linux network interface name:
$ systemctl enable eci-tsn-wait-sync-8021as@enp1s0.service && systemctl start eci-tsn-wait-sync-8021as@enp1s0.service && systemctl status eci-tsn-wait-sync-8021as@enp1s0.service
The expected output should be similar after < 15 seconds to the following:
Created symlink /etc/systemd/system/multi-user.target.wants/eci-tsn-wait-sync-8021as@enp1s0.service ? /lib/systemd/system/eci-tsn-wait-sync-8021as@.service. ● eci-tsn-wait-sync-8021as@enp1s0.service - ECI: Wait for clocks synchronization Loaded: loaded (/usr/lib/systemd/system/eci-tsn-wait-sync-8021as@.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/eci-tsn-wait-sync-8021as@.service.d └─10-isolcpu-rt.conf Active: active (exited) since Thu 2024-04-04 10:15:52 EDT; 3min 29s ago Main PID: 911119 (code=exited, status=0/SUCCESS) CPU: 11ms Apr 04 10:15:52 localhost.localdomain bash[911130]: rt tstamp: 1712240151894184064 Apr 04 10:15:52 localhost.localdomain bash[911130]: tai tstamp: 1712240188894184125 Apr 04 10:15:52 localhost.localdomain bash[911130]: phc tstamp: 1712240188894187060 Apr 04 10:15:52 localhost.localdomain bash[911130]: rt latency: 35 Apr 04 10:15:52 localhost.localdomain bash[911130]: tai latency: 43 Apr 04 10:15:52 localhost.localdomain bash[911130]: phc latency: 3404 Apr 04 10:15:52 localhost.localdomain bash[911130]: phc-rt delta: 37000002996 Apr 04 10:15:52 localhost.localdomain bash[911130]: phc-tai delta: 2935 Apr 04 10:15:52 localhost.localdomain bash[911130]: Clocks on this system are synchronized :) Apr 04 10:15:52 localhost.localdomain systemd[1]: Finished ECI: Wait for clocks synchronization.
Optionally, enable, start, and monitor check_clocks for Intel® Industrial Ethernet Controllers on a particular Linux network interface name:
Important
gPTP monitoring and tracing is only available on Intel® Ethernet Controller supporting PPS_CAPTUREASSERT callback pps_source_info API:
[Endpoint PCI
8086:125b
] Intel® Ethernet Controller I226-LM for Time-Sensitive Networking (TSN)[Endpoint PCI
8086:15f2
] Intel® Ethernet Controller I225-LM for Time-Sensitive Networking (TSN)[Endpoint PCI
8086:157b
,8086:1533
,8086:1537
,…] Intel® Ethernet Controller I210-IT for Time-Sensitive Networking (TSN)
as well as Intel® Ethernet Controller supporting PTP_SYS_OFFSET_PRECISE callback ptp_clock_info API (non-exhaustive list) :
[Endpoint PCI
8086:4b32
,8086:4ba0
,8086:4bb0
, …] Intel® Atom™ x6000 Series [Elkhart Lake] Ethernet GbE Time-Sensitive Network Controller[Endpoint PCI
8086:a0ac
] 11th Gen Intel® Core™ U-Series and P-Series [Tiger Lake] Ethernet GbE Time-Sensitive Network Controller[Endpoint PCI
8086:7aac
and8086:7aad
] 12th Gen Intel® Core™ S-Series [Alder Lake] Ethernet GbE Time-Sensitive Network Controller… more
$ systemctl enable eci-tsn-track-sync-8021as@enp1s0.service && systemctl start eci-tsn-track-sync-8021as@enp1s0.service && systemctl status eci-tsn-track-sync-8021as@enp1s0.service
The expected output should be similar to the following:
? eci-tsn-track-sync-8021as@enp1s0.service - ECI: Check that time is synchronized Loaded: loaded (/lib/systemd/system/eci-tsn-track-sync-8021as@.service; enabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/service.d └─10-override-protect-proc.conf Active: active (running) since Tue 2018-08-28 09:01:42 UTC; 22ms ago Main PID: 24159 (check_clocks) Tasks: 1 (limit: 9164) Memory: 284.0K CPU: 1ms CGroup: /system.slice/system-eci\x2dtsn\x2dtrack\x2dsync\x2d8021as.slice/eci-tsn-track-sync-8021as@enp1s0.service └─24159 check_clocks -d enp1s0 -va eci-intel-23f0 systemd[1]: Starting ECI: Check that time is synchronized... eci-intel-23f0 systemd[1]: Started ECI: Check that time is synchronized. eci-intel-23f0 check_clocks[24159]: Dumping timestamps and deltas eci-intel-23f0 check_clocks[24159]: /dev/pps0 can be enabled from /dev/ptp0 on device enp1s0 eci-intel-23f0 check_clocks[24159]: trying PPS source "/dev/pps0" eci-intel-23f0 check_clocks[24159]: found PPS source "/dev/pps0" eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446903 sequence: 1928 offset: 3569 trt_lat=8184 tai_lat=37000008267 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446904 sequence: 1929 offset: 3688 trt_lat=4427 tai_lat=37000004486 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446905 sequence: 1930 offset: 4284 trt_lat=4721 tai_lat=37000004780 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446906 sequence: 1931 offset: 3651 trt_lat=4371 tai_lat=37000004415 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446907 sequence: 1932 offset: 4308 trt_lat=4446 tai_lat=37000004471 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446908 sequence: 1933 offset: 3663 trt_lat=4466 tai_lat=37000004493 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446909 sequence: 1934 offset: 3644 trt_lat=4313 tai_lat=37000004346 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446910 sequence: 1935 offset: 4233 trt_lat=4505 tai_lat=37000004555 eci-intel-23f0 check_clocks[24159]: pps-phc-timestamp: 1535446911 sequence: 1936 offset: 3662 trt_lat=4363 tai_lat=37000004397
For more logs:
$ journalctl -xe -u eci-tsn-track-sync-8021as@enp1s0.service | more
Report the check_clocks statistics to
ftrace
pulse-per-secondsequence
id-1075 to id-1084 interval for Intel® Industrial Ethernet controllers on the particular Linux network interface name:less /sys/kernel/tracing/per_cpu/cpu1/trace
# tracer: nop # # entries-in-buffer/entries-written: 7/7 #P:4 # # _-------=> irqs-off # / _------=> need-resched # | / _-----=> need-resched-lazy # || / _----=> hardirq/softirq # ||| / _---=> preempt-depth # |||| / _--=> preempt-lazy-depth # ||||| / _-=> migrate-disable # |||||| / delay # TASK-PID CPU# ||||||| TIMESTAMP FUNCTION # | | | ||||||| | | <...>-24159 [001] ....... 331549.637493: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447154.3793 seq=2179 tai_lat=37000004746 ep=enp1s0 <...>-24159 [001] ....... 331550.637510: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447155.3693 seq=2180 tai_lat=37000004506 ep=enp1s0 <...>-24159 [001] ....... 331568.637825: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447173.3772 seq=2198 tai_lat=37000004657 ep=enp1s0 <...>-24159 [001] ....... 331569.637842: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447174.3710 seq=2199 tai_lat=37000004450 ep=enp1s0 <...>-24159 [001] ....... 331570.637860: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447175.4131 seq=2200 tai_lat=37000004474 ep=enp1s0 <...>-24159 [001] ....... 331571.637877: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447176.3723 seq=2201 tai_lat=37000004374 ep=enp1s0 <...>-24159 [001] ....... 331572.637895: tracing_mark_write: 0: trace_event_clock_sync: parent_ts=1535447177.4119 seq=2202 tai_lat=37000004408 ep=enp1s0
Visualize IEEE 802.1Q packet tracing in Timeview-UI for Intel® Industrial Ethernet controllers on the particular Linux network interface name:
Note:
To override International Atomic Time (TAI) and UTC
currentUtcOffset
default 37-second value:$ pmc -u -b 0 -t 1 \ "SET GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0"The expected output should be similar to the following:
sending: SET GRANDMASTER_SETTINGS_NP 2046a1.fffe.056bdc-0 seq 0 RESPONSE MANAGEMENT GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 0 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0
eci-tsn-netlink@.service
- 802.1Q-2018 TSN Link-layer Service for Intel® Ethernet Controllers¶
IEEE 802.1Q-2018 has enforced predictable time of delivery by dividing Ethernet traffic into different classes, thus ensuring that at specific times only one traffic class (or set of traffic classes) has access to the network.
The following animation illustrates TSN endpoints and TSN bridge time-aware traffic scheduling to enable quality-of-service (QoS) for time-sensitive stream communication between Talkers and Listeners. To enable time-aware scheduling, bridges support the mechanisms defined in IEEE 802.1Q-2018 Enhancements for Scheduled Traffic (EST) feature (formerly known as 802.1Qbv).
It is strongly recommended to review systemd.network
, systemd.link
, and systemd.device
unit files used for configuring a TSN Endstation.
View the user manual to familiarize yourself with systemd
supported Linux Traffic-Class features:
$ man systemd.network
A snippet of the user manual is shown below:
SYSTEMD.NETWORK(5) systemd.network SYSTEMD.NETWORK(5)
NAME
systemd.network - Network configuration
SYNOPSIS
network.network
DESCRIPTION
A plain ini-style text file that encodes network configuration for matching network interfaces, used by systemd-networkd(8). See systemd.syntax(7) for a general description
of the syntax.
The main network file must have the extension .network; other extensions are ignored. Networks are applied to links whenever the links appear.
The .network files are read from the files located in the system network directories /lib/systemd/network and /usr/local/lib/systemd/network, the volatile runtime network
directory /run/systemd/network and the local administration network directory /etc/systemd/network. All configuration files are collectively sorted and processed in lexical
order, regardless of the directories in which they live. However, files with identical filenames replace each other. Files in /etc/ have the highest priority, files in
/run/ take precedence over files with the same name under /usr/. This can be used to override a system-supplied configuration file with a local file if needed. As a special
case, an empty file (file size 0) or symlink with the same name pointing to /dev/null disables the configuration file entirely (it is "masked").
Along with the network file foo.network, a "drop-in" directory foo.network.d/ may exist. All files with the suffix ".conf" from this directory will be parsed after the file
itself is parsed. This is useful to alter or add configuration settings, without having to modify the main configuration file. Each drop-in file must have appropriate
section headers.
In addition to /etc/systemd/network, drop-in ".d" directories can be placed in /lib/systemd/network or /run/systemd/network directories. Drop-in files in /etc/ take
precedence over those in /run/ which in turn take precedence over those in /lib/. Drop-in files under any of these directories take precedence over the main network file
wherever located.
Note that an interface without any static IPv6 addresses configured, and neither DHCPv6 nor IPv6LL enabled, shall be considered to have no IPv6 support. IPv6 will be
automatically disabled for that interface by writing "1" to /proc/sys/net/ipv6/conf/ifname/disable_ipv6.
View the user manual to familiarize yourself with systemd
supported device configuration (for example, ethtool ioctl
):
$ man systemd.link
A snippet of the user manual is shown below:
SYSTEMD.LINK(5) systemd.link SYSTEMD.LINK(5)
NAME
systemd.link - Network device configuration
SYNOPSIS
link.link
DESCRIPTION
A plain ini-style text file that encodes configuration for matching network devices, used by systemd-udevd(8) and in particular its net_setup_link builtin. See
systemd.syntax(7) for a general description of the syntax.
The link files are read from the files located in the system network directory /lib/systemd/network, the volatile runtime network directory /run/systemd/network, and the
local administration network directory /etc/systemd/network. Link files must have the extension .link; other extensions are ignored. All link files are collectively sorted
and processed in lexical order, regardless of the directories in which they live. However, files with identical filenames replace each other. Files in /etc/ have the
highest priority, files in /run/ take precedence over files with the same name in /lib/. This can be used to override a system-supplied link file with a local file if
needed. As a special case, an empty file (file size 0) or symlink with the same name pointing to /dev/null disables the configuration file entirely (it is "masked").
The link file contains a [Match] section, which determines if a given link file may be applied to a given device, as well as a [Link] section specifying how the device
should be configured. The first (in lexical order) of the link files that matches a given device is applied. Note that a default file 99-default.link is shipped by the
system. Any user-supplied .link should hence have a lexically earlier name to be considered at all.
See udevadm(8) for diagnosing problems with .link files.
View the user manual to familiarize yourself with systemd
supported device VLAN configuration:
$ man systemd.device
A snippet of the user manual is shown below:
SYSTEMD.DEVICE(5) systemd.device SYSTEMD.DEVICE(5)
NAME
systemd.device - Device unit configuration
SYNOPSIS
device.device
DESCRIPTION
A unit configuration file whose name ends in ".device" encodes information about a device unit as exposed in the sysfs/udev(7) device tree. This may be used to define dependencies between devices and other
units.
This unit type has no specific options. See systemd.unit(5) for the common options of all unit configuration files. The common configuration items are configured in the generic [Unit] and [Install] sections. A
separate [Device] section does not exist, since no device-specific options may be configured.
systemd will dynamically create device units for all kernel devices that are marked with the "systemd" udev tag (by default all block and network devices, and a few others). Note that if systemd-udev.service
is not running, no device units will be available (for example in a typical container).
Device units are named after the /sys/ and /dev/ paths they control. Example: the device /dev/sda5 is exposed in systemd as dev-sda5.device. For details about the escaping logic used to convert a file system
path to a unit name see systemd.unit(5).
To tag a udev device, use "TAG+="systemd"" in the udev rules file, see udev(7) for details.
Device units will be reloaded by systemd whenever the corresponding device generates a "changed" event. Other units can use ReloadPropagatedFrom= to react to that event.
Intel® ECI makes generic assumptions about the desired setting for several Intel® Ethernet Controllers capable to achieve IEEE 802.1Q-2018 network link configurations.
$ ls -l /usr/lib/systemd/system/eci-tsn-netlink-8021q@.service.d/
and
$ ls -l /usr/lib/systemd/system/eci-tsn-netlink-8021q-est@.service.d/
The /usr/libexec/eci-tsn-netlink-nictype.sh
helper script is used to instantiate unit files template on desired Linux network interface:
/usr/lib/systemd/system/eci-tsn-netlink-8021q-est@.service.d/:
total 64
-rw-r--r--. 1 root root 109 Apr 4 10:15 10-isolcpu-rt.conf
-rw-r--r--. 1 root root 798 Apr 2 20:58 default-netif.link
-rw-r--r--. 1 root root 606 Apr 2 20:58 default-qos-mqprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 default-vlan.netdev
-rw-r--r--. 1 root root 1995 Apr 2 20:58 i210-netif.link
-rw-r--r--. 1 root root 717 Apr 2 20:58 i210-qos-etf.network
-rw-r--r--. 1 root root 942 Apr 2 20:58 i210-qos-taprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 i210-vlan.netdev
-rw-r--r--. 1 root root 1746 Apr 2 20:58 i225-netif.link
-rw-r--r--. 1 root root 720 Apr 2 20:58 i225-qos-etf.network
-rw-r--r--. 1 root root 1300 Apr 2 20:58 i225-qos-taprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 i225-vlan.netdev
-rw-r--r--. 1 root root 1409 Apr 2 20:58 mgbe-netif.link
-rw-r--r--. 1 root root 1592 Apr 2 20:58 mgbe-qos-etf.network
-rw-r--r--. 1 root root 1634 Apr 2 20:58 mgbe-qos-taprio.network
-rw-r--r--. 1 root root 219 Apr 2 20:58 mgbe-vlan.netdev
/usr/lib/systemd/system/eci-tsn-netlink-8021q@.service.d/:
total 52
-rw-r--r--. 1 root root 109 Apr 4 10:15 10-isolcpu-rt.conf
-rw-r--r--. 1 root root 798 Apr 2 20:58 default-netif.link
-rw-r--r--. 1 root root 606 Apr 2 20:58 default-qos-mqprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 default-vlan.netdev
-rw-r--r--. 1 root root 1995 Apr 2 20:58 i210-netif.link
-rw-r--r--. 1 root root 607 Apr 2 20:58 i210-qos-mqprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 i210-vlan.netdev
-rw-r--r--. 1 root root 1746 Apr 2 20:58 i225-netif.link
-rw-r--r--. 1 root root 609 Apr 2 20:58 i225-qos-mqprio.network
-rw-r--r--. 1 root root 222 Apr 2 20:58 i225-vlan.netdev
-rw-r--r--. 1 root root 1409 Apr 2 20:58 mgbe-netif.link
-rw-r--r--. 1 root root 1430 Apr 2 20:58 mgbe-qos-mqprio.network
-rw-r--r--. 1 root root 219 Apr 2 20:58 mgbe-vlan.netdev
This section describes how to enable IEEE 802.1Q-2018 Linux traffic control on a particular Intel® Ethernet controllers via systemd-networkd
network manager.
The following section is applicable to:
Setup Intel® Ethernet controllers according to eci-tsn-wait-sync-8021as@.service - TSN 802.1AS Services for Intel® Ethernet Controllers.
Enable services to set 802.1Q-2018 basics or super-set 802.1Q-2018-EST link-layer configuration for Intel® Industrial Ethernet controllers on a particular Linux network interface name:
Important
Make sure that you have explored the Earliest TxTime First (NET_SCHED_ETF) QDisc usages.
$ systemctl enable eci-tsn-netlink-8021q@enp1s0.service && systemctl start eci-tsn-netlink-8021q@enp1s0.service && systemctl status eci-tsn-netlink-8021q@enp1s0.service
The expected output should be similar to the following:
● eci-tsn-netlink-8021q@enp1s0.service - ECI: apply networkd 802.1Q Default Queue-Discipline preset Loaded: loaded (/usr/lib/systemd/system/eci-tsn-netlink-8021q@.service; disabled; preset: disabled) Drop-In: /usr/lib/systemd/system/eci-tsn-netlink-8021q@.service.d └─10-isolcpu-rt.conf Active: active (exited) since Thu 2024-04-04 10:15:53 EDT; 22min ago Process: 911135 ExecStart=/usr/libexec/eci-tsn-netlink-nictype.sh start enp1s0 mqprio eci-tsn-netlink-8021q (code=exited, status=0/SUCCESS) Process: 911188 ExecStartPost=udevadm trigger /sys/class/net/enp1s0 --verbose --action=bind (code=exited, status=0/SUCCESS) Main PID: 911135 (code=exited, status=0/SUCCESS) CPU: 59ms Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=3> Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Got result done/Success for job systemd-networkd.service Apr 04 10:15:53 localhost.localdomain systemctl[911184]: Bus n/a: changing state RUNNING → CLOSED Apr 04 10:15:53 localhost.localdomain udevadm[911188]: SELinux enabled state cached to: enabled Apr 04 10:15:53 localhost.localdomain udevadm[911188]: Successfully loaded SELinux database in 1.532ms, size on heap is 352K. Apr 04 10:15:53 localhost.localdomain udevadm[911188]: /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/enp1s0 Apr 04 10:15:53 localhost.localdomain systemd[1]: Finished ECI: apply networkd 802.1Q Default Queue-Discipline preset.
Verify whether the TSN Endstation systemd.network unit and systemd.link rules configuration files are set to the desired Linux network interface.
$ networkctl status enp1s0
The expected output should be similar to the following:
? 5: enp1s0 Link File: /run/systemd/network/00-tsn-endstation-enp1s0.link Network File: /run/systemd/network/00-tsn-endstation-enp1s0.network Type: ether State: carrier (configured) Path: pci-0000:01:00.0 Driver: igc Vendor: Intel Corporation Model: Ethernet Controller I225-LM HW Address: 00:a0:c9:00:00:00 (Intel Corporation) MTU: 1500 (min: 68, max: 9216) QDisc: mqprio IPv6 Address Generation Mode: none Queue Length (Tx/Rx): 4/4 Auto negotiation: yes Speed: 1Gbps Duplex: full Port: tp
The
tsn-endstation-enp1s0.link
andtsn-endstation-enp1s0.network
in this example has mqprio ROOT QDisc assigned to the interface.Optionally, edit
/run/systemd/network/00-tsn-endstation-enp1s0.network
networking rules for a desired interface with particular Intel Ethernet capabilities:[Match] Name=enp1s0 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=enp1s0.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [MultiqueuePrioShaper] Parent=root Handle=1 Numtc=4 Priomap=0 1 2 3 2 3 0 0 0 0 0 0 0 0 0 0 Queues=1@0 1@1 1@2 1@3
[Match] Name=enp1s0 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=enp1s0.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [MultiqueuePrioShaper] Parent=root Handle=1 Numtc=4 Priomap=3 2 1 0 1 0 3 3 3 3 3 3 3 3 3 3 Queues=1@0 1@1 1@2 1@3
[Match] Name=eno1 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=eno1.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [MultiqueuePrioShaper] Parent=root Handle=1 Numtc=8 Priomap=0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 Queues=1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 [TrafficControlFilterFlower] Parent=root Handle=1 # Match all PTPv2 messages Protocol=PTPv2 # Steer root:INGRESS to hw_tc=2 ClassId=ffff:ffe2 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress= [TrafficControlFilterFlower] Parent=root Handle=2 # Optional : Priority=1 # Match VLAN ID & PCP Protocol=802.1Q VlanPrio=3 VlanId=3 #VlanEthType=all # Steer root:INGRESS to hw_tc=3 ClassId=ffff:ffe3 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress= [TrafficControlFilterFlower] Parent=root Handle=3 # Optional : Priority=1 # Match VLAN ID & PCP Protocol=802.1Q VlanPrio=5 VlanId=3 #VlanEthType=all # Steer root:INGRESS to hw_tc=5 ClassId=ffff:ffe5 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress=
Reapply
/run/systemd/network/00-tsn-endstation-enp1s0.network
unit to enable all changes for the desired interface network interface:$ sudo systemctl restart systemd-networkd $ tc qdisc show dev enp1s0 && cat /proc/net/vlan/enp1s0.vlan && ethtool --show-features enp1s0 | grep -e hw-tc-offload -e ntuple-filters && ethtool -u enp1s0
The
eci-tsn-netlink-8021q@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc mqprio 1: root tc 4 map 0 1 2 3 2 3 0 0 0 0 0 0 0 0 0 0 queues:(0:0) (1:1) (2:2) (3:3) qdisc pfifo_fast 0: parent 1:4 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 1:3 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 1:2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc pfifo_fast 0: parent 1:1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 qdisc ingress ffff: parent ffff:fff1 ---------------- enp1s0.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 1161 total bytes received 376290 Broadcast/Multicast Rcvd 3 total frames transmitted 1640 total bytes transmitted 465084 Device: enp1s0 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 ntuple-filters: on hw-tc-offload: on 4 RX rings available Total 4 rules Filter: 0 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x88F7 mask: 0x0 Action: Direct to queue 2 Filter: 1 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x2000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 1 Filter: 2 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x6000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 3 Filter: 3 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0xa000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 3
$ sudo systemctl restart systemd-networkd $ tc qdisc show dev enp1s0 && cat /proc/net/vlan/enp1s0.vlan && ethtool --show-features enp1s0 | grep -e hw-tc-offload -e ntuple-filters && ethtool -u enp1s0
The
eci-tsn-netlink-8021q@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc mqprio 1: root tc 4 map 3 2 1 0 1 0 3 3 3 3 3 3 3 3 3 3 queues:(0:0) (1:1) (2:2) (3:3) qdisc fq_codel 0: parent 1:4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc ingress ffff: parent ffff:fff1 ---------------- enp1s0.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 24 total bytes transmitted 4506 Device: enp1s0 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 ntuple-filters: on hw-tc-offload: on 4 RX rings available Total 3 rules Filter: 0 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x88F7 mask: 0x0 Action: Direct to queue 2 Filter: 1 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x8100 mask: 0x0 VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x2000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 1 Filter: 2 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x8100 mask: 0x0 VLAN EtherType: 0x0 mask: 0xffff VLAN: 0xa000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 0
$ sudo systemctl restart systemd-networkd $ tc qdisc show dev eno1 && cat /proc/net/vlan/eno1.vlan && ethtool --show-features eno1 | grep -e hw-tc-offload && tc filter show dev eno1 root
The
eci-tsn-netlink-8021q@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc mqprio 1: root tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 queues:(0:0) (1:1) (2:2) (3:3) (4:4) (5:5) (6:6) (7:7) qdisc fq_codel 0: parent 1:8 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:7 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:6 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:5 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc fq_codel 0: parent 1:1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64 qdisc ingress ffff: parent ffff:fff1 ---------------- eno1.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 10989 total bytes received 779602 Broadcast/Multicast Rcvd 0 total frames transmitted 1109 total bytes transmitted 345901 Device: eno1 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 hw-tc-offload: on filter protocol 802.1Q pref 49150 flower chain 0 filter protocol 802.1Q pref 49150 flower chain 0 handle 0x3 hw_tc 5 vlan_id 3 vlan_prio 5 skip_sw in_hw in_hw_count 1 filter protocol 802.1Q pref 49151 flower chain 0 filter protocol 802.1Q pref 49151 flower chain 0 handle 0x2 hw_tc 3 vlan_id 3 vlan_prio 3 skip_sw in_hw in_hw_count 1 filter protocol [35063] pref 49152 flower chain 0 filter protocol [35063] pref 49152 flower chain 0 handle 0x1 hw_tc 2 eth_type 88f7 skip_sw in_hw in_hw_count 1
Important
Make sure that you have explored the Time Aware Priority (NET_SCHED_TAPRIO) QDisc usages.
$ systemctl enable eci-tsn-netlink-8021q-est@enp1s0.service && systemctl start eci-tsn-netlink-8021q-est@enp1s0.service && systemctl status eci-tsn-netlink-8021q-est@enp1s0.service
The expected output should be similar to the following:
Created symlink /etc/systemd/system/multi-user.target.wants/eci-tsn-netlink-8021q-est@enp1s0.service ? /lib/systemd/system/eci-tsn-netlink-8021q-est@.service. ? eci-tsn-netlink-8021q-est@enp1s0.service - ECI: apply networkd 802.1Q Enhanced-Scheduling Time (EST) Queue-Discipline preset Loaded: loaded (/lib/systemd/system/eci-tsn-netlink-8021q-est@.service; enabled; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/eci-tsn-netlink-8021q-est@.service.d └─10-isolcpu-rt.conf Active: active (exited) since Thu 2024-04-04 10:41:52 EDT; 5s ago Process: 911490 ExecStart=/usr/libexec/eci-tsn-netlink-nictype.sh start enp1s0 taprio eci-tsn-netlink-8021q-est (code=exited, status=0/SUCCESS) Process: 911578 ExecStartPost=udevadm trigger /sys/class/net/enp1s0 --verbose --action=bind (code=exited, status=0/SUCCESS) Main PID: 911490 (code=exited, status=0/SUCCESS) CPU: 57ms Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1/unit/systemd_2dnetworkd_2eservice interface=org.freedesktop.DBus.Prop> Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Got message type=signal sender=org.freedesktop.systemd1 destination=n/a path=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=5> Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Got result done/Success for job systemd-networkd.service Apr 04 10:41:52 localhost.localdomain systemctl[911573]: Bus n/a: changing state RUNNING → CLOSED Apr 04 10:41:52 localhost.localdomain udevadm[911578]: SELinux enabled state cached to: enabled Apr 04 10:41:52 localhost.localdomain udevadm[911578]: Successfully loaded SELinux database in 2.964ms, size on heap is 352K. Apr 04 10:41:52 localhost.localdomain udevadm[911578]: /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/enp1s0 Apr 04 10:41:52 localhost.localdomain systemd[1]: Finished ECI: apply networkd 802.1Q Enhanced-Scheduling Time (EST) Queue-Discipline preset.
Verify whether the TSN end-station systemd.network unit and systemd.link rules configuration files are set to the desired Linux network interface.
$ networkctl status enp1s0
The expected output should be similar to the following:
? 5: enp1s0 Link File: /run/systemd/network/00-tsn-endstation-enp1s0.link Network File: /run/systemd/network/00-tsn-endstation-enp1s0.network Type: ether State: carrier (configured) Path: pci-0000:01:00.0 Driver: igc Vendor: Intel Corporation Model: Ethernet Controller I225-LM HW Address: 00:a0:c9:00:00:00 (Intel Corporation) MTU: 1500 (min: 68, max: 9216) QDisc: taprio IPv6 Address Generation Mode: none Queue Length (Tx/Rx): 4/4 Auto negotiation: yes Speed: 1Gbps Duplex: full Port: tp
The
tsn-endstation-enp1s0.link
andtsn-endstation-enp1s0.network
in this example have mqprio ROOT QDisc assigned to the interface.Optionally, edit
/run/systemd/network/00-tsn-endstation-enp1s0.network
udev rules for a desired interface with particular Intel Ethernet hardware offload capabilities:[Match] Name=enp1s0 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=enp1s0.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [TimeAwarePrioShaper] Parent=root Handle=1 Numtc=4 Priomap=0 1 2 3 2 3 0 0 0 0 0 0 0 0 0 0 Queues=1@0 1@1 1@2 1@3 SchedEntry=S 01 500000 SchedEntry=S 0e 500000 # MY Begining-of-Time is Wednesday 29 August 2018 07:40:00 Basetime=1535528400000000000 # I225-LM required past-time paradise .e.g. no reCalibration BasetimeCalibration=0 #No GuardCycles= Cycletime=1000000 CycletimeExtension=0 TxTimeMode=hwoffload TxTimeDelay=0
[Match] Name=enp1s0 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=enp1s0.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [TimeAwarePrioShaper] Parent=root Handle=1 Numtc=4 Priomap=3 2 1 0 1 0 3 3 3 3 3 3 3 3 3 3 Queues=1@0 1@1 1@2 1@3 SchedEntry=S 03 500000 SchedEntry=S 0C 500000 Basetime=1663141103000000000 GuardCycles=100 BasetimeCalibration=1 Cycletime=1000000 CycletimeExtension=0 TxTimeDelay=200000 TxTimeMode=assisted # hwoffload N/A ClockId=CLOCK_TAI [EarliestTxTimeFirst] Parent=1:1 Handle=0 ClockId=CLOCK_TAI DeltaNSec=100000 Deadline=0 Offload=1 SkipSocket=1
[Match] Name=eno1 [Network] #DHCP=no Description=The TSN-endstation physical ethernet device # Make netif member of VLAN interfaces on it: VLAN=eno1.vlan # In case of 'tagged only' setups, you probably don't need any IP # configuration on the link without VLAN (or: default VLAN). # For that just omit an [Address] section and disable all the # autoconfiguration magic like this: LinkLocalAddressing=no LLDP=no EmitLLDP=no IPv6AcceptRA=no IPv6SendRA=no [QDisc] Parent=ingress Handle=100 [TimeAwarePrioShaper] Parent=root Handle=1 Numtc=8 Priomap=0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 Queues=1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 SchedEntry=S 42 500000 SchedEntry=S 43 500000 Basetime=1663141103000000000 # No GuardCycles= BasetimeCalibration=0 Cycletime=1000000 CycletimeExtension=0 TxTimeMode=hwoffload TxTimeDelay=0 # No ClockId= [TrafficControlFilterFlower] Parent=root Handle=1 # Match all PTPv2 messages Protocol=PTPv2 # Steer root:INGRESS to hw_tc=2 ClassId=ffff:ffe2 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress= [TrafficControlFilterFlower] Parent=root Handle=2 # Optional : Priority=1 # Match VLAN ID & PCP Protocol=802.1Q VlanPrio=3 VlanId=3 #VlanEthType=all # Steer root:INGRESS to hw_tc=3 ClassId=ffff:ffe3 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress= [TrafficControlFilterFlower] Parent=root Handle=3 # Optional : Priority=1 # Match VLAN ID & PCP Protocol=802.1Q VlanPrio=5 VlanId=3 #VlanEthType=all # Steer root:INGRESS to hw_tc=5 ClassId=ffff:ffe5 SkipSoftware=1 # Optional : Match src/dst MAC addresses #SrcMACAddress= #DstMACAddress=
Reapply
/run/systemd/network/00-tsn-endstation-enp1s0.network
unit to enable all changes for the desired interface network interface:$ sudo systemctl restart systemd-networkd $ tc qdisc show dev enp1s0 && cat /proc/net/vlan/enp1s0.vlan && ethtool --show-features enp1s0 | grep -e hw-tc-offload -e ntuple-filters && ethtool -u enp1s0
The
eci-tsn-netlink-8021q-est@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc taprio 1: root refcnt 5 tc 4 map 0 1 2 3 2 3 0 0 0 0 0 0 0 0 0 0 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 clockid invalid flags 0x2 base-time 1663141103000000000 cycle-time 1000000 cycle-time-extension 0 index 0 cmd S gatemask 0x1 interval 500000 index 1 cmd S gatemask 0xe interval 500000 qdisc pfifo 0: parent 1:4 limit 1000p qdisc pfifo 0: parent 1:3 limit 1000p qdisc pfifo 0: parent 1:2 limit 1000p qdisc pfifo 0: parent 1:1 limit 1000p qdisc ingress ffff: parent ffff:fff1 ---------------- enp1s0.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 1162 total bytes received 376615 Broadcast/Multicast Rcvd 3 total frames transmitted 1668 total bytes transmitted 471216 Device: enp1s0 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 ntuple-filters: on hw-tc-offload: on 4 RX rings available Total 4 rules Filter: 0 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x88F7 mask: 0x0 Action: Direct to queue 2 Filter: 1 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x2000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 1 Filter: 2 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x6000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 3 Filter: 3 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x0 mask: 0xFFFF VLAN EtherType: 0x0 mask: 0xffff VLAN: 0xa000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 3
$ sudo systemctl restart systemd-networkd $ tc qdisc show dev enp1s0 && cat /proc/net/vlan/enp1s0.vlan && ethtool --show-features enp1s0 | grep -e hw-tc-offload -e ntuple-filters && ethtool -u enp1s0
The
eci-tsn-netlink-8021q-est@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc taprio 1: root refcnt 9 tc 4 map 3 2 1 0 1 0 3 3 3 3 3 3 3 3 3 3 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 clockid TAI flags 0x1 txtime delay 200000 base-time 1695907943991000000 cycle-time 1000000 cycle-time-extension 0 index 0 cmd S gatemask 0x3 interval 500000 index 1 cmd S gatemask 0xc interval 500000 qdisc pfifo 0: parent 1:4 limit 1000p qdisc pfifo 0: parent 1:3 limit 1000p qdisc pfifo 0: parent 1:2 limit 1000p qdisc etf 8002: parent 1:1 clockid TAI delta 100000 offload on deadline_mode off skip_sock_check on qdisc ingress ffff: parent ffff:fff1 ---------------- enp1s0.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 37 total bytes transmitted 7070 Device: enp1s0 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 ntuple-filters: on hw-tc-offload: on 4 RX rings available Total 3 rules Filter: 0 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x88F7 mask: 0x0 Action: Direct to queue 2 Filter: 1 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x8100 mask: 0x0 VLAN EtherType: 0x0 mask: 0xffff VLAN: 0x6000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 0 Filter: 2 Flow Type: Raw Ethernet Src MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Dest MAC addr: 00:00:00:00:00:00 mask: FF:FF:FF:FF:FF:FF Ethertype: 0x8100 mask: 0x0 VLAN EtherType: 0x0 mask: 0xffff VLAN: 0xa000 mask: 0x1fff User-defined: 0x0 mask: 0xffffffffffffffff Action: Direct to queue 0
$ sudo systemctl restart systemd-networkd $ tc qdisc show dev eno1 && cat /proc/net/vlan/eno1.vlan && ethtool --show-features eno1 | grep -e hw-tc-offload && tc filter show dev eno1 root
The
eci-tsn-netlink-8021q-est@.service
expected Linux Traffic Class offload features and Ethertype RX flow-type steering rules should be similar to the following:qdisc taprio 1: root tc 8 map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 offset 4 count 1 offset 5 count 1 offset 6 count 1 offset 7 count 1 clockid invalid flags 0x2 base-time 1663141103000000000 cycle-time 1000000 cycle-time-extension 0 index 0 cmd S gatemask 0x42 interval 500000 index 1 cmd S gatemask 0x43 interval 500000 qdisc pfifo 0: parent 1:8 limit 1000p qdisc pfifo 0: parent 1:7 limit 1000p qdisc pfifo 0: parent 1:6 limit 1000p qdisc pfifo 0: parent 1:5 limit 1000p qdisc pfifo 0: parent 1:4 limit 1000p qdisc pfifo 0: parent 1:3 limit 1000p qdisc pfifo 0: parent 1:2 limit 1000p qdisc pfifo 0: parent 1:1 limit 1000p qdisc ingress ffff: parent ffff:fff1 ---------------- eno1.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 8 total bytes received 2592 Broadcast/Multicast Rcvd 0 total frames transmitted 38 total bytes transmitted 7409 Device: eno1 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 hw-tc-offload: on filter protocol 802.1Q pref 49150 flower chain 0 filter protocol 802.1Q pref 49150 flower chain 0 handle 0x3 hw_tc 5 vlan_id 3 vlan_prio 5 skip_sw in_hw in_hw_count 1 filter protocol 802.1Q pref 49151 flower chain 0 filter protocol 802.1Q pref 49151 flower chain 0 handle 0x2 hw_tc 3 vlan_id 3 vlan_prio 3 skip_sw in_hw in_hw_count 1 filter protocol [35063] pref 49152 flower chain 0 filter protocol [35063] pref 49152 flower chain 0 handle 0x1 hw_tc 2 eth_type 88f7 skip_sw in_hw in_hw_count 1
Important:
ECI adds
systemd-networkd.service
drop-in to insure :Clear prior traffic-class QDisc
tc qdisc del dev enp1s0 root
(mandatory).Clear prior traffic-class Filter
tc filter del dev enp1s0 root
(mandatory).increased Verbosity (optional)
$ sudo systemctl cat systemd-networkd | tail -n 12
# /etc/systemd/system/systemd-networkd.service.d/10-tfilter-enp1s0-cleanup.conf [Service] ExecStartPre=-/usr/sbin/tc filter del dev enp1s0 parent ffff: # /etc/systemd/system/systemd-networkd.service.d/11-qdisc-enp1s0-cleanup.conf [Service] ExecStartPre=-/usr/sbin/tc qdisc del dev enp1s0 root # /etc/systemd/system/systemd-networkd.service.d/12-debug-enp1s0.conf [Service] Environment=SYSTEMD_LOG_LEVEL=debug
Optionally, edit
/run/systemd/network/enp1s0.vlan.netdev
device unit configuration for TSN Endstation VLAN ingress and egress QoS (for example, VLAN ID and PCP):[NetDev] Name=enp1s0.vlan Kind=vlan [VLAN] Description=The TSN-endstation VLAN RT-traffic class ethernet device Id=3 EgressQOSMaps=1-1 2-2 3-3 4-4 5-5 6-6 7-7 IngressQOSMaps=1-1 2-2 3-3 4-4 5-5 6-6 7-7
Note: Restarting
systemd-networkd.service
will NOT override existingsystemd.device
unit configurations. You need to clean prior VLAN configurations.$ ip link del enp1s0.vlan $ sudo systemctl restart systemd-networkd $ cat /proc/net/vlan/enp1s0.vlan
The expected output should be similar to the following:
enp1s0.vlan VID: 3 REORDER_HDR: 1 dev->priv_flags: 1021 total frames received 0 total bytes received 0 Broadcast/Multicast Rcvd 0 total frames transmitted 20 total bytes transmitted 3236 Device: enp1s0 INGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
Optionally, edit
/run/systemd/network/00-tsn-endstation-enp1s0.link
udev rules for a desired interface with particular Intel Ethernet hardware offload capabilities:[Match] Driver=igc OriginalName=enp1s0 [Link] NamePolicy=kernel database onboard path slot AlternativeNamesPolicy=database onboard path slot MACAddressPolicy=persistent # Disable TCPSegmentationOffload=0 GenericSegmentationOffload=0 GenericReceiveOffload=0 #Disable Flow control RxFlowControl=1 TxFlowControl=1 AutoNegotiationFlowControl=1 #Hw-Filters NTupleFilter=1 # 802.1AS PTPv2 traffic -> Queue2 NfcFlowType=ether proto 0x88f7 queue 2 # All Best-effort non-rt traffic -> Queue0 #NfcFlowType=ether dst 01:00:5e:00:00:01 queue 0 # Vlan PCP 1-2 -> Queue1 NfcFlowType=ether vlan 0x2000 m 0x1FFF queue 1 #NfcFlowType=ether vlan 0x4000 m 0x1FFF queue 1 # Vlan PCP 3-4 -> Queue3 NfcFlowType=ether vlan 0x6000 m 0x1FFF queue 3 #NfcFlowType=ether vlan 0x8000 m 0x1FFF queue 3 # Vlan PCP 5 -> Queue3 NfcFlowType=ether vlan 0xA000 m 0x1FFF queue 3 HwTcOffload=1 L2FwdOffload=0 # Enable Frame-Preemption FramePreemption=1 #Disable Energy-Efficient Ethernet EeeEnable=0 #VLANTag Hw-Filters ReceiveVLANCTAGHardwareAcceleration=0 TransmitVLANCTAGHardwareAcceleration=0 ReceiveVLANCTAGFilter=0 TransmitVLANSTAGHardwareAcceleration=0 #RxChannels= #TxChannels= #OtherChannels= CombinedChannels=4 #RxCoalesceSec= #RxMaxCoalescedFrames= #RxCoalesceIrqSec= #RxMaxCoalescedIrqFrames= #TxCoalesceSec= #TxMaxCoalescedFrames= #TxCoalesceIrqSec= #TxMaxCoalescedIrqFrames= #StatisticsBlockCoalesceSec= #UseAdaptiveRxCoalesce= #UseAdaptiveTxCoalesce= #CoalescePacketRateLow= #RxCoalesceLowSec= #RxMaxCoalescedLowFrames= #TxCoalesceLowSec= #TxMaxCoalescedLowFrames= #CoalescePacketRateHigh= #RxCoalesceHighSec= #RxMaxCoalescedHighFrames= #TxCoalesceHighSec= #TxMaxCoalescedHighFrames= #CoalescePacketRateSampleIntervalSec= #RxBufferSize=256 #TxBufferSize=256
[Match] Driver=igb OriginalName=enp1s0 [Link] NamePolicy=kernel database onboard path slot AlternativeNamesPolicy=database onboard path slot MACAddressPolicy=persistent # Disable TCPSegmentationOffload=0 GenericSegmentationOffload=0 GenericReceiveOffload=0 #Disable Flow control RxFlowControl=1 TxFlowControl=1 AutoNegotiationFlowControl=1 #HwOffload NTupleFilter=1 # 802.1AS PTPv2 traffic -> Queue2 NfcFlowType=ether proto 0x88f7 queue 2 # All Best-effort non-rt traffic -> Queue3 #NfcFlowType=udp4 src-port 4242 dst-port 4242 queue 3 #NfcFlowType=udp4 dst 01:00:5e:00:00:01 queue 3 #NfcFlowType=tcp4 dst 01:00:5e:00:00:01 queue 3 #NfcFlowType=ip4 dst 01:00:5e:00:00:01 queue 3 # Vlan PCP 1-2 -> Queue1 #NfcFlowType=ether proto 0x8100 vlan 0x2000 m 0x1FFF queue 1 #NfcFlowType=ether proto 0x8100 vlan 0x4000 m 0x1FFF queue 1 # Vlan PCP 3-4 -> Queue0 NfcFlowType=ether proto 0x8100 vlan 0x6000 m 0x1FFF queue 0 #NfcFlowType=ether proto 0x8100 vlan 0x8000 m 0x1FFF queue 0 # Vlan PCP 5 -> Queue0 NfcFlowType=ether proto 0x8100 vlan 0xA000 m 0x1FFF queue 0 HwTcOffload=1 L2FwdOffload=0 #Disable Energy-Efficient Ethernet EeeEnable=0 # N/A Frame-Preemption #FramePreemption= #VLANTag Hw-Filters ReceiveVLANCTAGHardwareAcceleration=0 TransmitVLANCTAGHardwareAcceleration=0 ReceiveVLANCTAGFilter=0 TransmitVLANSTAGHardwareAcceleration=0 #RxChannels= #TxChannels= #OtherChannels= CombinedChannels=4 #RxCoalesceSec= #RxMaxCoalescedFrames= #RxCoalesceIrqSec= #RxMaxCoalescedIrqFrames= #TxCoalesceSec= #TxMaxCoalescedFrames= #TxCoalesceIrqSec= #TxMaxCoalescedIrqFrames= #StatisticsBlockCoalesceSec= #UseAdaptiveRxCoalesce= #UseAdaptiveTxCoalesce= #CoalescePacketRateLow= #RxCoalesceLowSec= #RxMaxCoalescedLowFrames= #TxCoalesceLowSec= #TxMaxCoalescedLowFrames= #CoalescePacketRateHigh= #RxCoalesceHighSec= #RxMaxCoalescedHighFrames= #TxCoalesceHighSec= #TxMaxCoalescedHighFrames= #CoalescePacketRateSampleIntervalSec= RxBufferSize=4096 TxBufferSize=4096 #RxMiniBufferSize= #RxJumboBufferSize=
[Match] Driver=st_gmac OriginalName=enp0s29f1 [Link] NamePolicy=kernel database onboard path slot AlternativeNamesPolicy=database onboard path slot MACAddressPolicy=persistent # Disable TCPSegmentationOffload=0 GenericSegmentationOffload=0 GenericReceiveOffload=0 #Disable Flow control RxFlowControl=1 TxFlowControl=1 AutoNegotiationFlowControl=1 #Hw-Filters HwTcOffload=1 L2FwdOffload=0 #Disable Energy-Efficient Ethernet EeeEnable=0 # mGbE does NOT support Ethtool-based NTupleFilter # mGbE does NOT support Ethtool-based FramePreemption= #VLANTag Hw-Filters ReceiveVLANCTAGHardwareAcceleration=0 TransmitVLANCTAGHardwareAcceleration=0 ReceiveVLANCTAGFilter=0 TransmitVLANSTAGHardwareAcceleration=0 RxChannels=8 TxChannels=8 #OtherChannels= #CombinedChannels=4 #RxCoalesceSec= #RxMaxCoalescedFrames= #RxCoalesceIrqSec= #RxMaxCoalescedIrqFrames= #TxCoalesceSec= #TxMaxCoalescedFrames= #TxCoalesceIrqSec= #TxMaxCoalescedIrqFrames= #StatisticsBlockCoalesceSec= #UseAdaptiveRxCoalesce= #UseAdaptiveTxCoalesce= #CoalescePacketRateLow= #RxCoalesceLowSec= #RxMaxCoalescedLowFrames= #TxCoalesceLowSec= #TxMaxCoalescedLowFrames= #CoalescePacketRateHigh= #RxCoalesceHighSec= #RxMaxCoalescedHighFrames= #TxCoalesceHighSec= #TxMaxCoalescedHighFrames= #CoalescePacketRateSampleIntervalSec= #RxBufferSize=4096 #TxBufferSize=4096 #RxMiniBufferSize= #RxJumboBufferSize=
Reapply
/run/systemd/network/00-tsn-endstation-enp1s0.link
udev rules to enable all changes for the desired interface network interface:$ sudo udevadm trigger /sys/class/net/enp1s0 --verbose --action=bind && journalctl -b -u systemd-udevd
The expected output with
systemd-udevd.service
DEBUG level message should be similar to the following:eci-intel-23f0 systemd-udevd[25516]: enp1s0: Config file /run/systemd/network/00-tsn-endstation-enp1s0.link is applied eci-intel-23f0 systemd-udevd[25516]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable. eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : tx-generic-segmentation eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : rx-gro eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : tx-tcp-segmentation eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : rx-ntuple-filter eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : l2-fwd-offload eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : hw-tc-offload eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : tx-vlan-hw-insert eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : rx-vlan-hw-parse eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : rx-vlan-filter eci-intel-23f0 systemd-udevd[25516]: ethtool: set feature bit : tx-vlan-stag-hw-insert eci-intel-23f0 systemd-udevd[25516]: enp1s0: netlink: set user frame-preemption eci-intel-23f0 systemd-networkd[25466]: rtnl: received non-static neighbor, ignoring. eci-intel-23f0 systemd-networkd[25466]: enp1s0: Flags change: -LOWER_UP -RUNNING eci-intel-23f0 systemd-networkd[25466]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_35 interface=org.freedesktop.DBus.Prop> eci-intel-23f0 systemd-networkd[25466]: enp1s0: Lost carrier eci-intel-23f0 systemd-networkd[25466]: enp1s0: State is failed, dropping config eci-intel-23f0 systemd-udevd[25516]: enp1s0: netlink: set user eee eci-intel-23f0 systemd-udevd[25516]: ethtool: clear nfc rx rules 4/64: Success eci-intel-23f0 systemd-udevd[25516]: enp1s0: netlink: user set nfc rx rules needed=4 eci-intel-23f0 systemd-udevd[25516]: ethtool: set rx nfc flow-type [id=0x0] rule : Success eci-intel-23f0 systemd-udevd[25516]: ethtool: set rx nfc flow-type [id=0x1] rule : Success eci-intel-23f0 systemd-udevd[25516]: ethtool: set rx nfc flow-type [id=0x2] rule : Success eci-intel-23f0 systemd-udevd[25516]: ethtool: set rx nfc flow-type [id=0x3] rule : Success eci-intel-23f0 systemd-udevd[25516]: enp1s0: Device has addr_assign_type=0 eci-intel-23f0 systemd-udevd[25516]: enp1s0: MAC on the device already matches policy *persistent* eci-intel-23f0 systemd-udevd[25516]: enp1s0: Device has name_assign_type=4 eci-intel-23f0 systemd-udevd[25516]: enp1s0: Policy *path* yields "enp1s0". eci-intel-23f0 systemd-udevd[25516]: enp1s0: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'enp1s0' eci-intel-23f0 systemd-udevd[25516]: enp1s0: sd-device: Created db file '/run/udev/data/n5' for '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/net/enp1s0'
Visualize IEEE 802.1Q packet tracing in Timeview-UI for Intel® Industrial Ethernet controllers on the particular Linux network interface name:
TSN Endstation Troubleshooting¶
How do I activate systemd-networkd.service
, systemd-udevd.service
, or both DEBUG
log-level messages?
The systemd-udevd.service
udev rules tsn-endstation-enp1s0.link
parsed errors or driver limitations need debugging. Activate systemd-udevd.service
DEBUG
log-level message using the drop-in file with the following content:
$ mkdir -p /etc/systemd/system/systemd-udevd.service.d/
$ vi /etc/systemd/system/systemd-udevd.service.d/10-debug.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
Then, apply the same approach for debugging systemd-networkd.service
unit file tsn-endstation-enp1s0.network
parse errors and driver limitations. Activate systemd-networkd.service
DEBUG
log-level message using the drop-in file with the following content:
$ mkdir -p /etc/systemd/system/systemd-networkd.service.d
$ vi /etc/systemd/system/systemd-networkd.service.d/10-debug.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
Reload and restart systemd-networkd.service
and systemd-udevd.service
to apply the drop-in files :
$ systemctl daemon-reload
$ systemctl restart systemd-udevd && systemctl restart systemd-networkd
Visualize the debug info, warnings, and errors :
$ journalctl -b -u systemd-udevd -u systemd-networkd
...
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule space-separation split argp[2]=0xA000
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule space-separation split argp[3]=m
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule space-separation split argp[4]=0x1FFF
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule space-separation split argp[5]=queue
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule space-separation split argp[6]=3
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule parser start : ether vlan 0xA000 m 0x1FFF queue 3
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: Found 'ether' 7 options of flow-type RX rules
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: Matched 'vlan' RX rule value argp[2]=0xA000
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: Matched 'vlan-mask' RX rule mask argp[4]=0x1FFF
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: Matched 'queue' RX rule value argp[6]=3
eci-intel-23f0 systemd-udevd[25470]: /run/systemd/network/00-tsn-endstation-enp1s0.link:32: nfc: flow-type RX rule parser Succeed : ether vlan 0xA000 m 0x1FFF queue 3
eci-intel-23f0 systemd-udevd[25470]: Parsed configuration file /run/systemd/network/00-tsn-endstation-enp1s0.link
eci-intel-23f0 systemd-networkd[25466]: enp1s0.vlan: NDisc handler get timeout event
eci-intel-23f0 systemd-networkd[25466]: enp1s0.vlan: link_check_ready(): DHCP4 or DHCP6 is enabled but no dynamic address is assigned yet.
...
eci-intel-23f0 systemd-udevd[26303]: enp1s0: Config file /run/systemd/network/00-tsn-endstation-enp1s0.link is applied
eci-intel-23f0 systemd-udevd[26303]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : tx-generic-segmentation
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : rx-gro
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : tx-tcp-segmentation
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : rx-ntuple-filter
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : l2-fwd-offload
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : hw-tc-offload
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : tx-vlan-hw-insert
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : rx-vlan-hw-parse
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : rx-vlan-filter
eci-intel-23f0 systemd-udevd[26303]: ethtool: set feature bit : tx-vlan-stag-hw-insert
eci-intel-23f0 systemd-udevd[26303]: enp1s0: netlink: set user frame-preemption
eci-intel-23f0 systemd-udevd[26303]: enp1s0: netlink: set user eee
eci-intel-23f0 systemd-udevd[26303]: ethtool: clear nfc rx rules 4/64: Success
eci-intel-23f0 systemd-udevd[26303]: enp1s0: netlink: user set nfc rx rules needed=4
eci-intel-23f0 systemd-udevd[26303]: ethtool: set rx nfc flow-type [id=0x0] rule : Success
eci-intel-23f0 systemd-udevd[26303]: ethtool: set rx nfc flow-type [id=0x1] rule : Success
eci-intel-23f0 systemd-udevd[26303]: ethtool: set rx nfc flow-type [id=0x2] rule : Success
eci-intel-23f0 systemd-udevd[26303]: ethtool: set rx nfc flow-type [id=0x3] rule : Success
eci-intel-23f0 systemd-udevd[26303]: enp1s0: Device has addr_assign_type=0
eci-intel-23f0 systemd-udevd[26303]: enp1s0: MAC on the device already matches policy *persistent*
eci-intel-23f0 systemd-udevd[26303]: enp1s0: Device has name_assign_type=4
eci-intel-23f0 systemd-udevd[26303]: enp1s0: Policy *path* yields "enp1s0".
eci-intel-23f0 systemd-udevd[26303]: enp1s0: /usr/lib/udev/rules.d/80-net-setup-link.rules:11 NAME 'enp1s0'
eci-intel-23f0 systemd-udevd[26303]: enp1s0: sd-device: Created db file '/run/udev/data/n5' for '/devices/pci0000:00/0000:00:01.0/0000:01:00.0/net/enp>
eci-intel-23f0 systemd-udevd[26303]: enp1s0: Device (SEQNUM=4178, ACTION=bind) processed
eci-intel-23f0 systemd-udevd[26303]: enp1s0: sd-device-monitor: Passed 813 byte to netlink monitor
...
eci-intel-23f0 systemd-networkd[26408]: enp1s0: found matching network '/run/systemd/network/00-tsn-endstation-enp1s0.network'
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_FLAGS: 2
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME: 1000000
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION: 0
eci-intel-23f0 systemd-networkd[26408]: enp1s0: Orig: 1535528400000000000
eci-intel-23f0 systemd-networkd[26408]: enp1s0: Now : 1535531048107213912
eci-intel-23f0 systemd-networkd[26408]: enp1s0: Specified 'basetime' as expired! No Recalibration
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_SCHED_BASE_TIME: 1535528400000000000
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY index: 0
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD: 0
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY_GATE_MASK: 1
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY_INTERVAL: 500000
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY index: 1
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD: 0
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY_GATE_MASK: e
eci-intel-23f0 systemd-networkd[26408]: enp1s0: TCA_TAPRIO_SCHED_ENTRY_INTERVAL: 500000
eci-intel-23f0 systemd-networkd[26408]: enp1s0: Configuring traffic control
...
How do I stress test 802.1Q-2018 link layer?
Install the TSN Endstation test helper services provided by the tsn-endstation-loadtest
package.
sudo apt install tsn-endstation-loadtest
For example, on Debian distribution set with ECI repository, the following should be displayed:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
iperf3 xdpdump
The following NEW packages will be installed:
iperf3 tsn-endstation-loadtest xdpdump
0 upgraded, 3 newly installed, 0 to remove and 26 not upgraded.
Need to get 38.4 kB/40.1 kB of archives.
After this operation, 120 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://lava.lavalab/wheeljack/apt-repos/ECI/3.0/bullseye/eci-bullseye isar/main amd64 tsn-endstation-loadtest all 3.0-bullseye-2 [1736 B]
Get:2 http://lava.lavalab/mirrors/debian bullseye/main amd64 iperf3 amd64 3.9-1 [28.4 kB]
Get:3 http://lava.lavalab/wheeljack/apt-repos/ECI/3.0/bullseye/eci-bullseye isar/main amd64 xdpdump amd64 1.1-bullseye [9976 B]
Fetched 38.4 kB in 0s (132 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package iperf3.
(Reading database ... 62263 files and directories currently installed.)
Preparing to unpack .../iperf3_3.9-1_amd64.deb ...
Unpacking iperf3 (3.9-1) ...
Selecting previously unselected package xdpdump.
Preparing to unpack .../xdpdump_1.1-bullseye_amd64.deb ...
Unpacking xdpdump (1.1-bullseye) ...
Selecting previously unselected package tsn-endstation-loadtest.
Preparing to unpack .../tsn-endstation-loadtest_3.0-bullseye-2_all.deb ...
Unpacking tsn-endstation-loadtest (3.0-bullseye-2) ...
Setting up xdpdump (1.1-bullseye) ...
Setting up iperf3 (3.9-1) ...
Setting up tsn-endstation-loadtest (3.0-bullseye-2) ...
Processing triggers for man-db (2.9.4-2) ...