eden projet tsn training tsn for embedded systems
TRANSCRIPT
EDEN ProjectTSN Training
Marc Boyer (ONERA)
Pierre Julien Chaine (AD&S)
Outline
1 Introduction
2 Element of contexts
3 Per topic overview
4 Bibliography
EDEN / TSN Training
Introduction
TSN is not a technology
TSN is the name of a IEEE task group of the IEEE 802.1 Working GroupTSN : Time-Sensitive Networkinghttp://ieee802.org/1/pages/tsn.htmlhttps://1.ieee802.org/
Documents : Naming : 802.1Q, 802.1ad, and 802.1Qat...From one up to even four letters after 802.1
Uppercase : standardsLower-case : amendments-REV : revision (more extensive changes to the existing text than can beundertaken in an amendment)
Document Access :Working documents : need to be member (≈)Published standard :
≈ free after 6 months : �IEEE Standards runs a Get IEEE802 program thatallows anyone to download the standards for free, 6 months after publication.�Or buy it
2/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contextsEthernet frameSome numbersBouding delays
3 Per topic overview
4 Bibliography
Outline
1 Introduction
2 Element of contextsEthernet frameSome numbersBouding delays
3 Per topic overview
4 Bibliography
EDEN / TSN Training
Element of contexts
Ethernet frame
Ethernet frame(s)
Address : 6 Bytes / 48 bits
EtherType : size (if ≤ 1500) or encapsulated protocol
802.1Q Header : Tag protocol identi�er (TPID) = 0x8100Priority code point (PCP) : 3 bits / 0-7Drop eligible indicator (DEI) : 1 bitVLAN identi�er (VID) : 12-bits0x000 : no VLAN / 0xFFF : forbidden / 4,094 VLANs
Payload : 60-1500 Bytes
CRC/FCS : the frame check sequence (FCS) is a four-octet cyclicredundancy check (CRC)
IFG/IPG : Inter Frame Gap aka Inter Packet Gap
3/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contextsEthernet frameSome numbersBouding delays
3 Per topic overview
4 Bibliography
EDEN / TSN Training
Element of contexts
Some numbers
Some magnitude numbers : e�ciency
E�ciencyBit rate is of importance, but which part is really usable ?E�ciency = payload
medium use
Ethernet e�ciency (units in bytes) :
Overhead : 8+6+6+4+2+4+12= 42
Minimal payload : 42
Ethernet packet + IFG : 84 Bytes � 1542 Bytes1
42+42≈ 1, 2%, 42
42+42= 50%, 1500
1500+42≈ 97%
Encapsulation :IP overhead : 20UDP overhead : 16
4/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Element of contexts
Some numbers
Some magnitude numbers : transmission time
Link speed 1B 64B 143B 1542B
10Mbit/s 0.8µs 51.2µs 114µs 1.23ms100Mbit/s 80ns 5.12µs 11.4µs 0.123 ms1Gbit/s 8ns 0.512µs 1.14µs 12.3 µs10Gbit/s 0.8ns 51.2ns 0.114µs 1.23 µs
Table � Emission times
Light speed30 cm/ns
1.5m in 51 nsSignal speedCommon value≈ 60% light
speed [1, �N.6]
5/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contextsEthernet frameSome numbersBouding delays
3 Per topic overview
4 Bibliography
EDEN / TSN Training
Element of contexts
Bouding delays
Flow speci�cation and network performances
average vs. maximal valuevalue distribution
�ow common characteristicsthroughput : stabilityburst : delayexample : number of vehicles on aroad, per year, per day, between5pm and 7 pm...
the token bucketthroughput r, burst bon any observation interval ofduration d, the data amount is lessthan
b+ d · r (1)
6/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Element of contexts
Bouding delays
The problem of cyclic dependencies
The waiting time of R in queue 1 depends onthe �ow characteristics of R (known) and of G' that depends onthe �ow characteristics of G (known) and of B' that depends onthe �ow characteristics of B (known) and of R' that depends onthe waiting time of R in queue 1...
7/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overviewTime synchronizationUltra reliabilityBounded low latencyCon�guration
4 Bibliography
EDEN / TSN Training
Per topic overview
The TSN promise
Figure � TSN Overview, J. Farkas [2]
8/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overviewTime synchronizationUltra reliabilityBounded low latencyCon�guration
4 Bibliography
EDEN / TSN Training
Per topic overview
Time synchronization
802.1AS Time synchronization
802.1AS, based on IEEE 1588 (aka PTP) previous version in 2011, WG2016-2019, updated in 2020 (802.1AS-Rev is now 802.1AS)
notion of Grand Master (GM) : clock source
a better 802.1AS, in particularredundancy : on paths and GMsbut not all kind of faultsnot considering �instability of the Grandmaster Clock, such as time glitches,excess jitter, or wander...� [16, 7.2.4.3], c©2020 IEEE.
principleselect the �best� GMmeasure node-to-node delay (regular exchanges)GM sends it clock, slaves correct local clock
warning : don't forget synchronization messages in the network design
9/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Time synchronization
Measuring propagation delay
Objective : compute d
Hypotheses :t ideal physical timec(t) clock on initiator attime tc(t) ≈ (1 + ε)t+ o
ε clock drift on initiatoro clock o�set
c′(t) ≈ (1 + ε′)t+ o′
Computation
2D = (c(t4) − c′(t3)) − (c(t1) − c
′(t2))
= d+ d′+ ε(t4 − t1) + ε
′(d− d
′+ t1 − t4)
D ≈d+ d′
2≈ d
t1 Pdelay_Req
t2
t3
Pdelay_R
esp,c′ (t2)
t4
Pdelay_R
esp,c′ (t3)
d
d′
10/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overviewTime synchronizationUltra reliabilityBounded low latencyCon�guration
4 Bibliography
EDEN / TSN Training
Per topic overview
Ultra reliability
VLAN (802.1Q pre-TSN)
Based on a Filtering Data Base (FDB, [1, � 8.8])
Associate to each (port,VID) a status yes/no
When a frame with VID V is received on port P and VID V, drop the frameif (P,V)=no ([1, � 8.6.2 Ingress �ltering])
De�nes the subset of ports where the frame could be forwarded ([1, � 8.6.3Frame �ltering])
Then does the same checking as at ingress for all potential output ports ([1,� 8.6.4 Egress �ltering])
11/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Ultra reliability
802.1Qci : Per-Stream Filtering and Policing � PSFP
actions done at reception (beforequeuing, after VLAN checking)
per stream identi�cation !
set the tra�c class (IPV � internalpriority value)
can drop out of contract frames
also a local GCL
Omitted for copyright reasons.
Figure � PSPF architecture [3, Fig. 8-12],c©2017 IEEE
12/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Ultra reliability
802.1CB : Frame Replication and Elimination for Reliability � FRER
Figure � FRER Illustration, [4, Fig. 7-1]
Frame duplication/replication
Elimination can be done inside the network
Can lead to out-of-order delivery
13/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Ultra reliability
802.1Qca : IS-IS Path Control and Reservation � PCR
It's about routing
Automatic Ethernet routing :Spanning Tree (LAN)IS-IS Shortest Path Tree (ISP)
802.1QcaExplicit path controlBased on existing protocols
14/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overviewTime synchronizationUltra reliabilityBounded low latencyCon�guration
4 Bibliography
EDEN / TSN Training
Per topic overview
Bounded low latency
Latency sources
Store and forward =⇒ (transmission + propagation) per hop
Queuing delay depends on tra�c load : no simple �time & space partitioning� (samepb in AFDX)
TSN o�ers mechanisms to guarantee performances by
limiting amount of interferencetaking interference into account when computing QoS
15/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1DC : a global QoS overview
802.1DC is still in draft version (d1.1)
802-1DC is made of two materials :1 QoS guide : de�nition related to QoS, global overview of QoS-related
mechanismsEx : �The purpose of this Clause 6 is to serve as a guide to the reader tounderstand the model for Quality of 4 Service (QoS) provision in IEEE Std802.1Q-2018.� [5, � 6] c©2019 IEEE
2 QoS in end-systems, �rewall, NAT, etc�This standard speci�es procedures and managed objects for Quality of Service(QoS) features speci�ed in 19 IEEE Std 802.1Q, such as (...) in a networksystem which is not a bridge.� [5, � 1.1] c©2019 IEEE
16/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
Static priority
Basic behavior
Tra�c class #7 (≈ queue) has the higher priority
Limitscan create starvation of lower priority levelspartialy solved by 802.1Qci (Per-stream �ltering and policing)non-preemptionpartialy solved by 802.1Qbu + 802.3br
17/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qaz : Bandwidth Sharing (SP/WRR, SP/DRR... � pre-TSN)
Enhanced Transmission Selection forBandwidth Sharing Between Tra�cClasses (aka ETS)
802.1Qaz, 2011 (pre-TSN)
Simple hierarchical scheduling : Staticpriority + Round-Robin-like
Introduced for data centers
Bandwidth Sharing isimplementation-de�ned
WRR cited in the standardDRR used in Linuxnot able to �nd choice of Cisco,Juniper...
Network calculus models exist[6, 7, 8, 9], but not comparison withother mechanisms TSN not done
18/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qav : Credit-Based Shaped (CBS)
�Forwarding and Queuing Enhancements forTime-Sensitive Stream � FQTSS�
802.1Qaz, 2011 (AVB, pre-TSN)
CBS shaper is optionnal
Each CBS shaper has a �slope� s parameter(in bit/s)
A credit increases when the queue waits, anddecreases when the queue transmits
It limits the associated queue to throuput s
Its shapes/spreads/smoothes the output
Designed toavoid starvationlimit jitter
Network calculus models exist [10, 11]
19/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qaz + 802.1Qav : ETS+CBS
20/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qbv : Time Aware Shaper � TAS
�Enhancements for Scheduled Tra�c�
A gate is associated to each queue
The gate is either open or closed
A global cyclic schedule (Gate Control List �GCL), w.r.t local clock
Building schedule is out of standard
�Exclusive gating� ≈ one gate opened at atime
Integration with GCL : update of creditevolution rules
End-to-end TT schedule requiresglobal build of local schedulessynchronisation of local clocks (eg.802.1AS)
21/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qch : Cyclic Queuing and Forwarding � CQF
Not a new �mechanism� : based on 802.1Qci (Filtering) and 802.1Qbv (TimeAware Shaper)
Divide time into time intervals of common length T
Frames received in one interval are forwarded in the next one
Global synchronisation =⇒ Low jitter (2T), simple delay computation (T ×nb of hops)
22/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.1Qcr : Asynchronous Tra�c Shaping � ATS
Still in Draft version (19 May 2020 � 802.1Qcr, Draft 2.3)
Queue waiting create jitter
ATS introduces delay to absorb the jittercomputes a �Eligibility Time� per frame
a local value (no global synchronisation)token-bucket parametersuse some share variables between ATS schedulers
head of queue can not be selected before this Eligibility Time
23/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
ATS : implementation and equivalent model
Complexity relies in computattion of �Eligibility Time�
Computed in order to be equivalent to group reshaping (token bucket) withaggregate queuing
A major theoretical breakthroughreshaping comes for freeavoid cyclic dependency problem
A few technical attention pointslatency performances done on equivalent modelno proof of equivalence up to nowrequiring upstream information
24/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
802.3br & 802.1Qbu : Preemption
Two classes of queues : express andpreemptable
An express frame ready fortransmission can fragment apreemptable frame being transmited
A frame of size ≤ 143B can not bepreemptedreduced the non-preemption cost bya factor of ≈ 10
Limitsa two levels only systempreemption has overhead (12 B +12B IFG + 8B preamble)
SMD : Start mPacket Delimiter
SMD-Sx : SMD Start x ∈ [0, 1, 2, 3]
SMD-Cx : SMD Continuationx ∈ [0, 1, 2, 3]
25/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Bounded low latency
QoS mechanisms in a bridge
26/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overviewTime synchronizationUltra reliabilityBounded low latencyCon�guration
4 Bibliography
EDEN / TSN Training
Per topic overview
Con�guration
802.1Qat : Stream Reservation Protocol � SRP
AVB group, Published in 2010, included in 802.1Q-2018
SRP utilizes three signaling protocols
MMRP : Talker registrationsMVRP : declare membership in a VLAN where a Stream is being sourcedMSRP : signaling protocol to reserve network resource
what is a stream ? [12][� 3]
Stream : A unidirectional �ow of data from a Talker to one or more ListenersListener : The end station that is the destination, receiver, or consumer of astream.Talker : The end station that is the source or producer of a stream.
stream characteristics
StreamID : �A 64-bit field that uniquely identifies a stream.�, within [12, � 35.2.2.8.2] c©2010 IEEE
MAC Address : 48 bitsUnique ID : 16 bits, used to distinguish among multiple streams sourced by thesame System
Tra�c Speci�cation (TSpec)MaxFrameSize : maximum frame, excluding any overheadMaxIntervalFrames maximum number of frames that the Talker may transmit inone �class measurement interval� (34.4)
27/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Con�guration
802.1Qcc : Stream Reservation Protocol (SRP) Enhancements and Performance Improvements
not only an SRP improvement, but also
� 46 Time-Sensitive Networking (TSN) con�guration3 con�guration models
Fully distributed modelCentralized network/distributed user modelFully centralized model [13, � 46.1.3.2]
User/network con�guration informationdetails on interface between application on network
28/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
EDEN / TSN Training
Per topic overview
Con�guration
The YANG model(s)
MIB encode a local con�gurations
YANG o�er a global view
comes from IETF (RFC 6020, 7950)
data modelling language, like XML, JSON
TSN group de�nes YANG modules speci�c to TSN≈ one YANG module per addenda
git repository : https://github.com/YangModels/yang
29/29EDEN / TSN Training Boyer, Chaine September 25th, 2020
Outline
1 Introduction
2 Element of contexts
3 Per topic overview
4 Bibliography
Bibliographie
[1] IEEE Standard for Local and Metropolitan Area Networks � Bridges andBridged Networks,IEEE Standard IEEE no 802.1Q (2018).
[2] J. Farkos,Standards from IEEE, IETF, 3GPP, and Beyond � ,Proc. of the TSN/A Conference 2019.
[3] IEEE Standard for Local and metropolitan area networks�Bridges andBridged Networks�Amendment 28 : Per-Stream Filtering and Policing ,Standard IEEE no 802.1Qci (2017).
[4] IEEE Draft Standard for Local and metropolitan area networks � FrameReplication and Elimination for Reliability ,Rapport Technique IEEE no 802.1CB (September 2017).
[5] IEEE Standard for Local and metropolitan area networks � Quality ofService Provision by Network Systems � Draft 1.1 ,IEEE Standard IEEE no 802.1DC/D1.1 (2019).
[6] A. Soni, X. Li, J.-L. Scharbarg et C. Fraboul,WCTT analysis of avionics Switched Ethernet Network with WRRScheduling.,Dans Proc. of the 26th International Conference on Real-Time Networksand Systems (RTNS), pp. 213�222. ACM (2018).
[7] M. Boyer, G. Stea et W. Mangoua Sofack,De�cit Round Robin with Network Calculus,Dans Proc. of the 6th International Conference on PerformanceEvaluation Methodologies and Tools (ValueTools 2012), Cargese, France(October, 9�12 2012).
[8] M. Boyer, N. Navet, M. Fumey, J. Migge et L. Havet,Combining static priority and weighted round-robin like packet schedulingin AFDX for incremental certi�cation and mixed-criticality support,Dans Proc. of the 5th European Conference for Aeronautics and SpaceSciences � Real Time Avionics and Networks Session (EUCASS 2013),Munich, Germany (July 1st�5th 2013).
[9] A. Soni, X. Li, J.-L. Scharbarg et C. Fraboul,Integrating O�set in Worst Case Delay Analysis of Switched EthernetNetwork With De�cit Round Robbin,Dans Proc. of 23rd IEEE International Conference on EmergingTechnologies and Factory Automation (ETFA), vol. 1, pp. 353�359. IEEE(2018).
[10] J. A. Ruiz de Azua et M. Boyer,Complete modelling of AVB in Network Calculus Framework,Dans Proc. of the 22nd Int. Conf. on Real-Time Networks and Systems(RTNS 2014), Versailles, France (October 8-10 2014).
[11] L. Zhao, F. He et E. Li,Improving Worst-Case Delay Analysis for Tra�c of Additional StreamReservation Class in Ethernet-AVB Network,MDPI Sensors, 18 (11) (2018).
[12] Virtual Bridged Local Area Networks Amendment 14 : Stream ReservationProtocol (SRP),Rapport Technique IEEE no IEEE 802.1Qat (2010).
[13] IEEE Standard for Local and metropolitan area networks� Bridges andBridged Networks � Amendment 31 : Stream Reservation Protocol (SRP)Enhancements and Performance Improvements,Standard IEEE no 802.1Qcc (2018).
[14] MEF,Subscriber Ethernet Service Attributes,Rapport Technique MEF Forum no MEF 10.4 (2018).
[15] Frame Replication and Elimination for Reliability � Amendment :Extended Stream identi�cation functions � Draft D0.7 ,Rapport Technique IEEE no P802.1CBdb/D0.7 (2020).
[16] Local and metropolitan area networks - Timing and Synchronization forTime-Sensitive Applications in Bridged Local Area Network,Rapport Technique IEEE no IEEE 802.1AS (2020).
[17] S. S. Craciunas, R. S. Oliver, M. Chmelík et W. Steiner,Scheduling Real-Time Communication in IEEE 802.1Qbv Time SensitiveNetworks,Dans Proceedings of the 24th International Conference on Real-TimeNetworks and Systems (RTNS'16), RTNS'16, pp. 183�192, New York,NY, USA, Association for Computing Machinery (2016).