SlideShare a Scribd company logo
Deterministic Networking for Real-Time Systems
(Using TSN and DetNet)
Henrik Austad
haustad@cisco.com
Cisco Systems
Prague, Oct 25, 2017
about:henrik
Cisco Collaboration, Audio group at
Lysaker, Norway
All things Linux
Real-time tweaking and tuning
Staring at traces
AVB/TSN and DetNet
“I have a script for that somewhere..”
https://projectworkplace.cisco.com
SX80 Codec backplane
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 1 / 23
Real-time systems
Correctness of system not only depends on the logical result,
but also on time of arrival
When an rt-system fails, bad things typically happen
Not a trivial problem for simple systems
Quite difficult for multicore (this subject is an entire talk by
itself..)
Heterogenous multicore, because apparently pain is temporary..
“I want to make a distributed real-time system using a packet-switched network with
off-the-shelf hardware!”
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 2 / 23
Challenge 1 - Time
Real-time systems have very strict requirements. Adding distributed to the mix;
No 2 clocks ever run at the same rate
Complex SW introduces latencies, giving rise to more uncertainties
Unpredictable network delays add insult to injury
NTP can du sub-ms accuracy if LAN, low traffic, full moon, Saturn and Venus in phase etc
PTP has already fixed this, enabling sub µs accuracy
HW Support in both the network and in the end-stations is strongly preferred
We are not going to cover PTP in more detail in this talk.
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 3 / 23
Challenge 2 - Reliable1
Packet Switched Networks (PSN)
Acceptable for a PSN to drop a frame on collision
Bridges have finite buffers (can lead to framedrops)
Next frame out on a port is probably FIFO, perhaps it supports vlan pcp
Jumboframes will block all others until tx completes
Cannot express “arrive no later than” to the network
... nor indicate “send frame at time X” to the NIC
And not “give me Y kbps of bandwidth and never, ever drop a frame”
1
“Reliable” as in “real-time systems”-reliable
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 4 / 23
Challenge 3+n (where n ∈ N0
)
Your application will probably have
some other application-specific issues
that are amplified by being distributed.
These are left as an exercise for the reader ;)
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 5 / 23
AVB/TSN
Source: https://goo.gl/images/l3846A
Audio/Video Bridging - AVB
This started out as a set of open standards that aimed to solve the network
challenge for media over PSN.
Idea: AD/DAs are cheap. Ethernet MACs are cheap...
Why not handle A/V digitally as early as possible?
⇒ Started out as Pro Audio/Video only.
Media must have guaranteed delivery, best-effort not
acceptable
Allows for very flexible setups (can easily reroute and
duplicate streams)
High (audio-)capacity in a single cable
As units grow smaller with more processing power,
being restricted by the physical dimensions of the
backplane is not otimal
Can co-exist with BE traffic
Office network combined with movie streaming
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 6 / 23
AVB
Initial target was simple systems (mic, speakers, DSPs)
Started out with etherframes (L2) only
Specified PTPv2 profile (gPTP)
Uses Stream Reservation Protocol (SRP) to express requirements to the network
An easy way to connect end-stations (IEEE 1722.1)
Security not that important (subnet only)
Reliable, low-jitter streams with guaranteed BW most important
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 7 / 23
The Credit Based Shaper (CBS)
https://en.wikipedia.org/wiki/File:Traffic-shaping.pdf
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 8 / 23
TSN: Time Sensitive Networking
People started to use AVB for all sorts of crazy things, so “AVB” proved to be a
misnomer. Renamed to TSN in Nov. 2012
Pro-AV
Consumer AV
Infotainment systems (cars, messaging boards, theme-parks, ...)
Automotive (ABS breaks, control systems, monitoring, etc)
Industrial applications (e.g. Control systems/Robotics, IIoT - “Industry 4.0”)
Combine Operation Technology (OT) networks with IT networks
Focus no longer on just to provide reliabe, jitter-free streams, but also on time of
transmission, frame preemption, larger networks, path redundancy.
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 9 / 23
IETF and Deterministic Networking (DetNet) WG
(https://datatracker.ietf.org/wg/detnet/about/)
Large network oriented (WAN support important)
Pseudo-wire encapsulation (invisible to the end-station)
Set of guidelines to achieve deterministic behavior (rather than hard requirements)
Multipath routing (replication and elimination)
Requires Central controller (not like 1722.1 where ’anyone’ can configure)
Brings a somewhat larger security concern to the table
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 10 / 23
DetNet motivation
Broadcasting (digital TV, PA at large venues)
Blockchain (to accelerate the consensus process)
Building Automation Systems (sensors, HVAC)
Electrical utilities (SmartGrid, coordinate producers, grid frequency)
Extremely low packet loss ratio (10−9
− 10−12
)
When end-to-end latency is important
Replacing proprietary deterministic networks
Same network for both critical and Best-Effort traffic
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 11 / 23
TSN in the Linux kernel
Previous approach was media centric
A lot of central pieces missing (hacked into network and media)
Mostly done via SW inside kernel (timing and best-effort tx of frames)
Made it possible to use whatever media-app to play audio over the network,
which was fun.
TSN is more than stream reservation.
Currently, only Intel’s i210 is available in a PCI-e formfactor, so this is the NIC
used for kernel testing.
But things are happening!
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 12 / 23
Time-triggered TSN driver
Author: Richard Cochrane
https://lkml.org/lkml/2017/9/18/76
A Time-triggered transmit approach (not bandwith centric)
Uses i210’s LaunchTime (32ns granularity time-triggered tx)
New socket option: so txtime (can specify “send frame at time X”)
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 13 / 23
/∗
∗ C r e d i t s : Richard Cochran <r c o c h r a n @ l i n u t r o n i x . de>
∗
∗ Lots l e f t out , only the e s s e n t i a l s are back
∗/
i n t setup ( void )
{
i n t fd = socket ( PF INET , SOCK DGRAM, IPPROTO UDP ) ;
/∗ more i n i t , and tag with SO TXTIME ∗/
s e t s o c k o p t ( fd , SOL SOCKET , SO TXTIME , &on , s i z e o f ( on ) ) ;
return fd ;
}
i n t send ( i n t fd , void ∗buf , i n t len , u64 txtime )
{
/∗ . . . ∗/
/∗ s e t txtime i n a cmsg , part of the message ∗/
cmsg = CMSG FIRSTHDR(&msg ) ;
cmsg−>c m s g l e v e l = SOL SOCKET ;
cmsg−>cmsg type = SO TXTIME ;
cmsg−>cmsg len = CMSG LEN( s i z e o f ( u64 ) ) ;
∗(( u64 ∗) CMSG DATA( cmsg )) = txtime ;
/∗ f i n a l l y , send i t , w i l l be sent at txtime ∗/
sendmsg ( fd , &msg , 0 ) ;
}
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 14 / 23
so txtime test
2 machines, time synchronized using PTP, connected via crossover cat5)
DUT running PREEMPT RT 4.9.40-rt30
Using i210 NIC
Look at time of arrival compared to expected arrival
Compares 2 modes, sw triggered tx-time (set a timer, send a frame) and HW
triggered tx.
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 15 / 23
so txtime results
plain preempt rt @1ms so txtime @1ms txtime @ 250 us
min: 19 408 ns 472 ns 472 ns
max: 75 560 ns 568 ns 576 ns
pk-pk: 56 152 ns 96 ns 104 ns
mean: 32 928 ns 507.23 ns 507.36 ns
stddev: 6 514.709 13.10849 15.07144
count: 600 000 600 000 2400000
Results from R. Cochrane. 10min testrun, times are delta from expected arrival time for frames, all values positive (e.g. no frames arrived earlier than specified)
obtained from https: // lkml. org/ lkml/ 2017/ 9/ 18/ 76
Note: a 2m Cat5-cable has a 10ns propagation delay.
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 16 / 23
Credit Based Shaper
Authors: Andre Guedes, Ivan Briano, Jesus Sanchez-Palencia and Vinicius
Gomes (Intel)
Currently on v9 (based on netdev-next)
https://www.spinics.net/lists/netdev/msg460869.html
Solving constant bandwidth (“classic AVB”)
Implemented as a Qdisc scheduler and an update to i210 driver (via
.ndo setup tc)
Uses mqprio as root qdisc
Use tc to assign a pcp to a hw-queue
Tie sch cbs to each queue afterwards and specify cbs parameters
A socket with a given priority will be handled by this scheduler.
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 17 / 23
cbs hw offload
# Create 4 s e p a r a t e queues
tc q d i s c r e p l a c e dev eth2 parent root mqprio num tc 4 
map 3 3 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 1@2 1@3 hw 0
tc −g c l a s s show dev eth2
+−−−(8008: f f e 3 ) mqprio
| +−−−(8008:4) mqprio # Tx−3
|
+−−−(8008: f f e 2 ) mqprio
| +−−−(8008:3) mqprio # Tx−2
|
+−−−(8008: f f e 1 ) mqprio
| +−−−(8008:2) mqprio # Tx−1, have CBS and time−t r i g g e r e d launch
|
+−−−(8008: f f e 0 ) mqprio
+−−−(8008:1) mqprio # Tx−0, have CBS and time−t r i g g e r e d launch
tc q d i s c add dev eth2 parent 8008:1 cbs i d l e s l o p e 20000 s e n d s l o p e −980000 
h i c r e d i t 30 l o c r e d i t −1470 o f f l o a d 1
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 18 / 23
/∗
∗ e x c e r p t from t s n t a l k e r
∗ Published by Guedes et . al , i n t e l 2017
∗
∗ h t t p s ://www. s p i n i c s . net / l i s t s / netdev /msg460869 . html
∗/
i n t send cbs ( void )
{
i n t fd , p r i o =3;
/∗ open socket and i n i t , removed f o r b r e v i t y ∗/
fd = socket (AF PACKET, SOCK DGRAM, htons (ETH P TSN ) ) ;
s e t s o c k o p t ( fd , SOL SOCKET , SO PRIORITY , &p r i o r i t y ,
s i z e o f ( p r i o r i t y ) ) ;
sendto ( fd , data , s i z e , 0 , s i z e , &addr , s i z e o f ( addr ) ) ;
c l o s e ( fd ) ;
}
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 19 / 23
Testing sch cbs (not up to scientific standards!)
Guedes et. al provided a set of scripts to test scheduler (tsn listener and tsn talker), that has
been slightly modified for the tests.
Device under Test:
old core2duo, 1.8GHz, 8GB, 7200rpm disk, running Linux v4.14-rc4 (netdev-next)
Intel i210 PCI-e NIC
chrt --fifo 50 ./tsn talker -i eth2 -d 14:da:e9:2b:0a:c1 -s1250 -p3
Generated load using “make -j16 all” of a Linux kernel
Receiver:
Intel i7 2700k, 16GB, Intel 82579V (e1000e), ssd, debian stable (linux v 3.16.0)
2 switches between (no vlan)
added tagging of trace marker to tsn listener
time sudo taskset -c 1 chrt --fifo 50 ./tsn listener -i eth2 -s 1250 -t
irq for eth2 bound to core 0
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 20 / 23
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 21 / 23
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 22 / 23
Future work
Better evaluation of sch cbs (my test was horrible)
Doing a “CBS-like” qdisc based on so txtime
Get merged into the kernel, they both serve a purpose
Accurate load measurements
Adapting the old tsn-driver to connect alsa to this
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 23 / 23
Thank you!
TSN - IEEE (for reference)
802.1BA - AVB Systems
802.1AS-2011 - gPTP
802.1Q-2014 (Sec 34: FQTSS - .1Qav, 35: Stream Reservation Protocol -
.1Qat)
1722 / 1722a d16 AVTP
1733 (AVTP over RTP)
1722.1 Discovery and enumeration
802.1Qbu Frame preemption
802.1Qbv Time triggered transmission
802.1QCB Frame replication and elimination
802.1Qch Cyclic Queueing and forwarding
802.1Qcp Yang modelling
...
Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 23 / 23

More Related Content

What's hot

DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
Thomas Graf
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
Sreenatha Reddy K R
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
Thomas Graf
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
Thomas Graf
 
Access over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEAccess over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoE
amiable_indian
 
Security Onion Advance
Security Onion AdvanceSecurity Onion Advance
Security Onion Advance
Kaustubh Padwad
 
Switchdev - No More SDK
Switchdev - No More SDKSwitchdev - No More SDK
Switchdev - No More SDK
Kernel TLV
 
LinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVSLinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVS
Thomas Graf
 
Network sockets
Network socketsNetwork sockets
Network sockets
Denys Haryachyy
 
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
Shinya Takamaeda-Y
 
Cilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPFCilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPF
Thomas Graf
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
Naoto MATSUMOTO
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
Thomas Graf
 
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモDNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
Shinya Takamaeda-Y
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Thomas Graf
 
LF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and GotchasLF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OpenvSwitch
 
Linux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use CasesLinux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use Cases
Kernel TLV
 
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverterKernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Anne Nicolas
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvr
Sim Janghoon
 

What's hot (20)

DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Introduction to tcp ip linux networking
Introduction to tcp ip   linux networkingIntroduction to tcp ip   linux networking
Introduction to tcp ip linux networking
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services2015 FOSDEM - OVS Stateful Services
2015 FOSDEM - OVS Stateful Services
 
Access over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoEAccess over Ethernet: Insecurites in AoE
Access over Ethernet: Insecurites in AoE
 
Security Onion Advance
Security Onion AdvanceSecurity Onion Advance
Security Onion Advance
 
Switchdev - No More SDK
Switchdev - No More SDKSwitchdev - No More SDK
Switchdev - No More SDK
 
LinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVSLinuxCon 2015 Stateful NAT with OVS
LinuxCon 2015 Stateful NAT with OVS
 
Network sockets
Network socketsNetwork sockets
Network sockets
 
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
Veriloggen.Thread & Stream: 最高性能FPGAコンピューティングを 目指したミックスドパラダイム型高位合成 (FPGAX 201...
 
Cilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPFCilium - API-aware Networking and Security for Containers based on BPF
Cilium - API-aware Networking and Security for Containers based on BPF
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
 
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモDNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
DNNのモデル特化ハードウェアを生成するオープンソースコンパイラNNgenのデモ
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NAT
 
LF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and GotchasLF_OVS_17_OVS-DPDK Installation and Gotchas
LF_OVS_17_OVS-DPDK Installation and Gotchas
 
Linux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use CasesLinux Kernel Cryptographic API and Use Cases
Linux Kernel Cryptographic API and Use Cases
 
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverterKernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvr
 

Similar to Tsn linux elce17

NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
Hajime Tazaki
 
Ns fundamentals 1
Ns fundamentals 1Ns fundamentals 1
Ns fundamentals 1
narmada alaparthi
 
Dc project 1
Dc project 1Dc project 1
Dc project 1
shwetha mk
 
20 Years of Streaming in 20 Minutes
20 Years of Streaming in 20 Minutes20 Years of Streaming in 20 Minutes
20 Years of Streaming in 20 Minutes
Alpen-Adria-Universität
 
TechEvent Apache Cassandra
TechEvent Apache CassandraTechEvent Apache Cassandra
TechEvent Apache Cassandra
Trivadis
 
An Optics Life
An Optics LifeAn Optics Life
An Optics Life
Thomas Weible
 
Network simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linuxNetwork simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linux
Pratik Joshi
 
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
Carlos Reaño González
 
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
Jose Antonio Coarasa Perez
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & How
Aniekan Akpaffiong
 
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLANDCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
rudndccn
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..
cscarcas
 
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
Flink Forward
 
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
Naoki (Neo) SATO
 
Bar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, PragueBar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, Prague
Jose Saldana
 
DOME 64-bit μDataCenter
DOME 64-bit μDataCenterDOME 64-bit μDataCenter
DOME 64-bit μDataCenter
inside-BigData.com
 
Client server computing in mobile environments part 2
Client server computing in mobile environments part 2Client server computing in mobile environments part 2
Client server computing in mobile environments part 2
Praveen Joshi
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale Supercomputer
Sagar Dolas
 

Similar to Tsn linux elce17 (20)

Tut hemant ns2
Tut hemant ns2Tut hemant ns2
Tut hemant ns2
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
 
Ns fundamentals 1
Ns fundamentals 1Ns fundamentals 1
Ns fundamentals 1
 
Dc project 1
Dc project 1Dc project 1
Dc project 1
 
20 Years of Streaming in 20 Minutes
20 Years of Streaming in 20 Minutes20 Years of Streaming in 20 Minutes
20 Years of Streaming in 20 Minutes
 
TechEvent Apache Cassandra
TechEvent Apache CassandraTechEvent Apache Cassandra
TechEvent Apache Cassandra
 
An Optics Life
An Optics LifeAn Optics Life
An Optics Life
 
Network simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linuxNetwork simulator 2 a simulation tool for linux
Network simulator 2 a simulation tool for linux
 
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
Pipelined Compression in Remote GPU Virtualization Systems using rCUDA: Early...
 
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
The CMS openstack, opportunistic, overlay, online-cluster Cloud (CMSooooCloud)
 
VMware NSX 101: What, Why & How
VMware NSX 101: What, Why & HowVMware NSX 101: What, Why & How
VMware NSX 101: What, Why & How
 
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLANDCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
DCCN 2016 - Tutorial 1 - Communication with LAN/WLAN
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..
 
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
Flink Forward Berlin 2017: Dr. Radu Tudoran - Huawei Cloud Stream Service in ...
 
Ns2pre
Ns2preNs2pre
Ns2pre
 
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
 
Bar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, PragueBar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, Prague
 
DOME 64-bit μDataCenter
DOME 64-bit μDataCenterDOME 64-bit μDataCenter
DOME 64-bit μDataCenter
 
Client server computing in mobile environments part 2
Client server computing in mobile environments part 2Client server computing in mobile environments part 2
Client server computing in mobile environments part 2
 
Programmable Exascale Supercomputer
Programmable Exascale SupercomputerProgrammable Exascale Supercomputer
Programmable Exascale Supercomputer
 

Recently uploaded

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 

Recently uploaded (20)

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 

Tsn linux elce17

  • 1. Deterministic Networking for Real-Time Systems (Using TSN and DetNet) Henrik Austad haustad@cisco.com Cisco Systems Prague, Oct 25, 2017
  • 2. about:henrik Cisco Collaboration, Audio group at Lysaker, Norway All things Linux Real-time tweaking and tuning Staring at traces AVB/TSN and DetNet “I have a script for that somewhere..” https://projectworkplace.cisco.com SX80 Codec backplane Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 1 / 23
  • 3. Real-time systems Correctness of system not only depends on the logical result, but also on time of arrival When an rt-system fails, bad things typically happen Not a trivial problem for simple systems Quite difficult for multicore (this subject is an entire talk by itself..) Heterogenous multicore, because apparently pain is temporary.. “I want to make a distributed real-time system using a packet-switched network with off-the-shelf hardware!” Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 2 / 23
  • 4. Challenge 1 - Time Real-time systems have very strict requirements. Adding distributed to the mix; No 2 clocks ever run at the same rate Complex SW introduces latencies, giving rise to more uncertainties Unpredictable network delays add insult to injury NTP can du sub-ms accuracy if LAN, low traffic, full moon, Saturn and Venus in phase etc PTP has already fixed this, enabling sub µs accuracy HW Support in both the network and in the end-stations is strongly preferred We are not going to cover PTP in more detail in this talk. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 3 / 23
  • 5. Challenge 2 - Reliable1 Packet Switched Networks (PSN) Acceptable for a PSN to drop a frame on collision Bridges have finite buffers (can lead to framedrops) Next frame out on a port is probably FIFO, perhaps it supports vlan pcp Jumboframes will block all others until tx completes Cannot express “arrive no later than” to the network ... nor indicate “send frame at time X” to the NIC And not “give me Y kbps of bandwidth and never, ever drop a frame” 1 “Reliable” as in “real-time systems”-reliable Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 4 / 23
  • 6. Challenge 3+n (where n ∈ N0 ) Your application will probably have some other application-specific issues that are amplified by being distributed. These are left as an exercise for the reader ;) Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 5 / 23
  • 8. Audio/Video Bridging - AVB This started out as a set of open standards that aimed to solve the network challenge for media over PSN. Idea: AD/DAs are cheap. Ethernet MACs are cheap... Why not handle A/V digitally as early as possible? ⇒ Started out as Pro Audio/Video only. Media must have guaranteed delivery, best-effort not acceptable Allows for very flexible setups (can easily reroute and duplicate streams) High (audio-)capacity in a single cable As units grow smaller with more processing power, being restricted by the physical dimensions of the backplane is not otimal Can co-exist with BE traffic Office network combined with movie streaming Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 6 / 23
  • 9. AVB Initial target was simple systems (mic, speakers, DSPs) Started out with etherframes (L2) only Specified PTPv2 profile (gPTP) Uses Stream Reservation Protocol (SRP) to express requirements to the network An easy way to connect end-stations (IEEE 1722.1) Security not that important (subnet only) Reliable, low-jitter streams with guaranteed BW most important Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 7 / 23
  • 10. The Credit Based Shaper (CBS) https://en.wikipedia.org/wiki/File:Traffic-shaping.pdf Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 8 / 23
  • 11. TSN: Time Sensitive Networking People started to use AVB for all sorts of crazy things, so “AVB” proved to be a misnomer. Renamed to TSN in Nov. 2012 Pro-AV Consumer AV Infotainment systems (cars, messaging boards, theme-parks, ...) Automotive (ABS breaks, control systems, monitoring, etc) Industrial applications (e.g. Control systems/Robotics, IIoT - “Industry 4.0”) Combine Operation Technology (OT) networks with IT networks Focus no longer on just to provide reliabe, jitter-free streams, but also on time of transmission, frame preemption, larger networks, path redundancy. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 9 / 23
  • 12. IETF and Deterministic Networking (DetNet) WG (https://datatracker.ietf.org/wg/detnet/about/) Large network oriented (WAN support important) Pseudo-wire encapsulation (invisible to the end-station) Set of guidelines to achieve deterministic behavior (rather than hard requirements) Multipath routing (replication and elimination) Requires Central controller (not like 1722.1 where ’anyone’ can configure) Brings a somewhat larger security concern to the table Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 10 / 23
  • 13. DetNet motivation Broadcasting (digital TV, PA at large venues) Blockchain (to accelerate the consensus process) Building Automation Systems (sensors, HVAC) Electrical utilities (SmartGrid, coordinate producers, grid frequency) Extremely low packet loss ratio (10−9 − 10−12 ) When end-to-end latency is important Replacing proprietary deterministic networks Same network for both critical and Best-Effort traffic Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 11 / 23
  • 14.
  • 15. TSN in the Linux kernel Previous approach was media centric A lot of central pieces missing (hacked into network and media) Mostly done via SW inside kernel (timing and best-effort tx of frames) Made it possible to use whatever media-app to play audio over the network, which was fun. TSN is more than stream reservation. Currently, only Intel’s i210 is available in a PCI-e formfactor, so this is the NIC used for kernel testing. But things are happening! Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 12 / 23
  • 16. Time-triggered TSN driver Author: Richard Cochrane https://lkml.org/lkml/2017/9/18/76 A Time-triggered transmit approach (not bandwith centric) Uses i210’s LaunchTime (32ns granularity time-triggered tx) New socket option: so txtime (can specify “send frame at time X”) Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 13 / 23
  • 17. /∗ ∗ C r e d i t s : Richard Cochran <r c o c h r a n @ l i n u t r o n i x . de> ∗ ∗ Lots l e f t out , only the e s s e n t i a l s are back ∗/ i n t setup ( void ) { i n t fd = socket ( PF INET , SOCK DGRAM, IPPROTO UDP ) ; /∗ more i n i t , and tag with SO TXTIME ∗/ s e t s o c k o p t ( fd , SOL SOCKET , SO TXTIME , &on , s i z e o f ( on ) ) ; return fd ; } i n t send ( i n t fd , void ∗buf , i n t len , u64 txtime ) { /∗ . . . ∗/ /∗ s e t txtime i n a cmsg , part of the message ∗/ cmsg = CMSG FIRSTHDR(&msg ) ; cmsg−>c m s g l e v e l = SOL SOCKET ; cmsg−>cmsg type = SO TXTIME ; cmsg−>cmsg len = CMSG LEN( s i z e o f ( u64 ) ) ; ∗(( u64 ∗) CMSG DATA( cmsg )) = txtime ; /∗ f i n a l l y , send i t , w i l l be sent at txtime ∗/ sendmsg ( fd , &msg , 0 ) ; } Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 14 / 23
  • 18. so txtime test 2 machines, time synchronized using PTP, connected via crossover cat5) DUT running PREEMPT RT 4.9.40-rt30 Using i210 NIC Look at time of arrival compared to expected arrival Compares 2 modes, sw triggered tx-time (set a timer, send a frame) and HW triggered tx. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 15 / 23
  • 19. so txtime results plain preempt rt @1ms so txtime @1ms txtime @ 250 us min: 19 408 ns 472 ns 472 ns max: 75 560 ns 568 ns 576 ns pk-pk: 56 152 ns 96 ns 104 ns mean: 32 928 ns 507.23 ns 507.36 ns stddev: 6 514.709 13.10849 15.07144 count: 600 000 600 000 2400000 Results from R. Cochrane. 10min testrun, times are delta from expected arrival time for frames, all values positive (e.g. no frames arrived earlier than specified) obtained from https: // lkml. org/ lkml/ 2017/ 9/ 18/ 76 Note: a 2m Cat5-cable has a 10ns propagation delay. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 16 / 23
  • 20. Credit Based Shaper Authors: Andre Guedes, Ivan Briano, Jesus Sanchez-Palencia and Vinicius Gomes (Intel) Currently on v9 (based on netdev-next) https://www.spinics.net/lists/netdev/msg460869.html Solving constant bandwidth (“classic AVB”) Implemented as a Qdisc scheduler and an update to i210 driver (via .ndo setup tc) Uses mqprio as root qdisc Use tc to assign a pcp to a hw-queue Tie sch cbs to each queue afterwards and specify cbs parameters A socket with a given priority will be handled by this scheduler. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 17 / 23
  • 21. cbs hw offload # Create 4 s e p a r a t e queues tc q d i s c r e p l a c e dev eth2 parent root mqprio num tc 4 map 3 3 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 1@2 1@3 hw 0 tc −g c l a s s show dev eth2 +−−−(8008: f f e 3 ) mqprio | +−−−(8008:4) mqprio # Tx−3 | +−−−(8008: f f e 2 ) mqprio | +−−−(8008:3) mqprio # Tx−2 | +−−−(8008: f f e 1 ) mqprio | +−−−(8008:2) mqprio # Tx−1, have CBS and time−t r i g g e r e d launch | +−−−(8008: f f e 0 ) mqprio +−−−(8008:1) mqprio # Tx−0, have CBS and time−t r i g g e r e d launch tc q d i s c add dev eth2 parent 8008:1 cbs i d l e s l o p e 20000 s e n d s l o p e −980000 h i c r e d i t 30 l o c r e d i t −1470 o f f l o a d 1 Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 18 / 23
  • 22. /∗ ∗ e x c e r p t from t s n t a l k e r ∗ Published by Guedes et . al , i n t e l 2017 ∗ ∗ h t t p s ://www. s p i n i c s . net / l i s t s / netdev /msg460869 . html ∗/ i n t send cbs ( void ) { i n t fd , p r i o =3; /∗ open socket and i n i t , removed f o r b r e v i t y ∗/ fd = socket (AF PACKET, SOCK DGRAM, htons (ETH P TSN ) ) ; s e t s o c k o p t ( fd , SOL SOCKET , SO PRIORITY , &p r i o r i t y , s i z e o f ( p r i o r i t y ) ) ; sendto ( fd , data , s i z e , 0 , s i z e , &addr , s i z e o f ( addr ) ) ; c l o s e ( fd ) ; } Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 19 / 23
  • 23. Testing sch cbs (not up to scientific standards!) Guedes et. al provided a set of scripts to test scheduler (tsn listener and tsn talker), that has been slightly modified for the tests. Device under Test: old core2duo, 1.8GHz, 8GB, 7200rpm disk, running Linux v4.14-rc4 (netdev-next) Intel i210 PCI-e NIC chrt --fifo 50 ./tsn talker -i eth2 -d 14:da:e9:2b:0a:c1 -s1250 -p3 Generated load using “make -j16 all” of a Linux kernel Receiver: Intel i7 2700k, 16GB, Intel 82579V (e1000e), ssd, debian stable (linux v 3.16.0) 2 switches between (no vlan) added tagging of trace marker to tsn listener time sudo taskset -c 1 chrt --fifo 50 ./tsn listener -i eth2 -s 1250 -t irq for eth2 bound to core 0 Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 20 / 23
  • 24. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 21 / 23
  • 25. Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 22 / 23
  • 26. Future work Better evaluation of sch cbs (my test was horrible) Doing a “CBS-like” qdisc based on so txtime Get merged into the kernel, they both serve a purpose Accurate load measurements Adapting the old tsn-driver to connect alsa to this Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 23 / 23
  • 28. TSN - IEEE (for reference) 802.1BA - AVB Systems 802.1AS-2011 - gPTP 802.1Q-2014 (Sec 34: FQTSS - .1Qav, 35: Stream Reservation Protocol - .1Qat) 1722 / 1722a d16 AVTP 1733 (AVTP over RTP) 1722.1 Discovery and enumeration 802.1Qbu Frame preemption 802.1Qbv Time triggered transmission 802.1QCB Frame replication and elimination 802.1Qch Cyclic Queueing and forwarding 802.1Qcp Yang modelling ... Henrik Austad (Cisco) TSN and Linux Prague, Oct 25, 2017 23 / 23