Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
AS
QatQccASRev
1588
1733
1722
3br
Qbu
TSN
CBQci
Qbv
Qca
Q
Qch
AB
QavTSNAVBEthernetTransport
Playbook
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Table of Contents
1. TSN Standards Overview .............................................................................................................................................................................................. 3
2. Conformance Testing .................................................................................................................................................................................................... 4
2.1. Conformance Testing: TTsuite-AVB-AS ........................................................................................................................................................... 4
2.1.1. Objective ................................................................................................................................................................................................ 4
2.1.2. Test Topology ........................................................................................................................................................................................ 5
2.1.3. Expected Behavior ................................................................................................................................................................................ 7
2.2. Conformance Testing: TTsuite-AVB-1722 ....................................................................................................................................................... 9
2.2.1. Objective ................................................................................................................................................................................................ 9
2.2.2. Test Topology ......................................................................................................................................................................................10
2.2.3. Expected Behavior ..............................................................................................................................................................................11
2.3. Conformance Testing: TTsuite-AVB-FQTSS ..................................................................................................................................................13
2.3.1. Objective ..............................................................................................................................................................................................13
2.3.2. Test Topology ......................................................................................................................................................................................14
2.3.3. Expected Behavior ..............................................................................................................................................................................17
3. Timing and Synchronization .......................................................................................................................................................................................19
3.1. IEEE802.1AS Synchronization Testing ..........................................................................................................................................................19
3.1.1. Test Case: Test DUT for Master Role .................................................................................................................................................21
3.1.2. Test Case: Test DUT for Slave Role ....................................................................................................................................................22
3.1.3. TestCase:TestDUTforSlaveRoleinAutomotiveProfile .............................................................................................................23
3.1.4. TestCase:TestDUTforMasterRoleinAutomotiveProfile ...........................................................................................................24
3.2. IEEE802.1AS Scalability Testing .....................................................................................................................................................................25
3.2.1. Test Case: Test gPTP Scalability ........................................................................................................................................................27
3.3. IEEE802.1AS Grandmaster Selection Testing ..............................................................................................................................................34
3.3.1. Test Case: Test for Grandmaster Selection ......................................................................................................................................37
3.4. IEEE802.1AS Bridge Performance Testing ...................................................................................................................................................40
3.4.1. Test Case: Test DUT for Time-Aware Bridge gPTP Timing Performance ....................................................................................40
4. TrafficShapingandPrioritization ...............................................................................................................................................................................48
4.1. Credit-Based Shaping and Bandwidth Reservation Testing ......................................................................................................................49
4.1.1. Test Case: Credit Shaping and Bandwidth Reservation Capabilities .........................................................................................49
4.2. Pre-emption Testing .........................................................................................................................................................................................56
4.2.1. TestCase:GenerationofModifiedPreamblePacketStream ......................................................................................................57
4.2.2. TestCase:CreatingTrafficProfilestoCausePre-emptionBetweenSwitchEgressPorts.........................................................59
5. Acronyms ................................................................................................................................................................................................................64
3
1. TSN Standards OverviewWhileEthernetisthemostwide-spreadnetworkingtechnologyemployed,itinherentlyoperatesonabesteffortbasistodeliverpacketsacrossanetwork.EthernetTime-SensitiveNetworking(TSN)StandardsenableEthernettobecomeadeterministicnetworkingtechnology:
• Synchronizationofnetworkelements:end-points,switchesandgateways• Controlledandaccountabledelay(latency)• Prioritizationoftrafficclasses• Guaranteed bandwidth reservation• Redundancy
TSNismadeupofmanystandardsthathavebeenandarebeingdevelopedexclusivelytotackledifferentissuesandfunctionalities. The following is the list of active and under development standards for TSN:
Standard Title
IEEE 802.1AS-2011 Timing and Synchronization for Time-Sensitive Applications in Bridged Local Area Networks
IEEE 802.1AS-Rev Timing and Synchronization for Time-Sensitive Applications
IEEE 802.1Qav Forwarding and Queuing Enhancements for Time-Sensitive Streams
IEEE 802.1Qbv EnhancementsforScheduledTraffic
IEEE 802.1Qbu Frame Pre-emption
IEEE 802.3br InterspersingExpressTraffic
IEEE 802.1Qat StreamReservationProtocol(SRP)
IEEE 802.1Qca Path Control and Reservation
IEEE 802.1Qcc Enhancements and Performance Improvements
IEEE 802.1CB Seamless Redundancy
IEEE 802.1Qci Per-Stream Filtering and Policing
IEEE 802.1Qch Cyclic Queuing and Forwarding
IEEE 802.1CM Time-SensitiveNetworkingforFront-haul
IEEE 802.1Qcr AsynchronousTrafficShaping
IEEE 802.1CS Local Registration Protocol
IEEE 1722-2011 Layer 2 Transport Protocol for Time-Sensitive Applications in a Bridged Local Area Network
IEEE 1722-Rev Enhance the Stream Transport Protocol
IEEE 1733-2011 Layer3TransportProtocolforTime-SensitiveApplicationsinLocalAreaNetworks
IEEE 1722.1-2013 DeviceDiscovery,Enumeration,ConnectionManagementandControlProtocol
ThisdocumentprovidesanoverviewofthevariousTime-SensitiveNetworkingprotocolsandstep-by-stepinstructionsonhowtotest different use cases using Spirent TestCenter.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
2. Conformance TestingSpirentAutomotiveAVBConformanceTestSuitePackisanAvnuAllianceaccreditedtestsolution.ItconsistsofdifferentprotocolconformancetestsuitesfortheAvnuAutomotiveAVBProfilerunningonSpirentC50deviceswithBroadR-Reachnetworkinterfacecards.Alltestsuitesarepreparedforfulltestautomationandincludeframeworksforindividualadaptation.Usersareabletocustomizetestscenarios,forinstancetomodifyorexcludeteststubactivities,ortoaddnegativetesting,etc.
Included Test Suites• TTsuite-AVB-Startup • TTsuite-AVB-Diagnostic • TTsuite-AVB-Exceptions • TTsuite-AVB-AS • TTsuite-AVB-FQTSS • TTsuite-AVB-1722
References• IEEE802.1AS-2011IEEEStandardforLocalandMetropolitanAreaNetworks—TimingandSynchronizationforTime-SensitiveApplicationsinBridgedLocalAreaNetworks
• IEEE802.1Q-2014IEEEStandardforLocalandmetropolitanareanetworks—BridgesandBridgedNetworks• IEEE1722-2016IEEEStandardforaTransportProtocolforTime-SensitiveApplicationsinBridgedLocalAreaNetworks• IEEE1722.1-2013IEEEStandardforDeviceDiscovery,ConnectionManagement,andControlProtocolforIEEE1722Based
Devices • AvnuAutomotiveEthernetAVBFunctionalandInteroperabilitySpecification,Revision1.412May2015
Avnu Test Plans • Automotive gPTP • Automotive Bridge FQTSS and SR Classes • Automotive EndStation Media Formats and SR Classes • Automotive Exception Handling • Automotive Diagnostic Counters • AutomotiveNetworkStartupRequirements• Spirent C50 with BroadR-Reach
For more information, visit: https://www.spirent.com/Products/TTworkbench/TTsuites/Automotive-AVB-Conformance
AVB Test Suites First Steps User’s Guide is available with any TT software and can be downloaded here.
2.1. Conformance Testing: TTsuite-AVB-AS2.1.1. Objective
InanAvnuAutomotiveenvironment,theBestMasterClockAlgorithm(BMCA)isnotperformed.Allmasterandslaveportsmustbepre-configuredandtheGrandMaster(GM)muststartthetransmissionofSyncmessagesimmediately,evenifitdoesnotreceiveanyothermessages.ThistestsimplyverifiesthatanAutomotiveEthernetDevice(AED)GrandMaster(GM)sendsSyncandFollowUpmessagesandthatitrespondstoPdelayRequestmessageswithPdelayResponseand Pdelay Follow Up messages. The expected message exchange diagram is shown below.
AED-GM Expected Behavior.
5
2.1.2. Test Topology The test case verifying this behavior is TC_Auto_gPTP_c_06_01_01_A.Itisthefirsttestcasefromthefirstgroupoftestcasesfromthe TTsuite-AVB-AS test suite. For step-by-step instructions on how to install and load the test campaign from the TTsuite-AVB-AS test suite please read https://support.spirent.com/SpirentCSC/SC_KnowledgeView?id=DOC10878 and https://support.spirent.com/SpirentCSC/SC_KnowledgeView?id=DOC10828
Thetesttopologyisverysimple.IftheDUTisanEndStation,justconnectittothelowestportnumberonthecardwhereTTworkbench(TTwb)isactiveontheC50.FormoredetailsaboutTTworkbenchandC50,pleasereadhttps://support.spirent.com/SpirentCSC/SC_KnowledgeView?id=DOC10828.IftheDUTisaBridge,thenconnectanyportontheDUTwiththelowestportnumberonthecardwhereTTwbisactive.PleasebesurethattheDUTisconfiguratedtobeaGM.
Only3parametersneedtobeconfiguratedbeforerunningthetestcase.Theseparametersare:
• DUTParameters > configurationParameters > px_DUT_macAddr: the MAC address of the DUT.
• DUTParameters > configurationParameters > px_DUT_clockId:theClockIDoftheDUT.UsuallythisisderivedfromtheMACaddress,byintroducingFFFEinthemiddleofit(afterthefirst3octets).
• DUTParameters > configurationParameters > px_DUT_portNbrTS1: the Port ID sent by the DUT inside gPTP messages on theportthatisconnectedtotheTestStation(C50)port.
FormoredetailsonhowtoconfigureandruntestcasesfromTTsuite-AVB-AStestsuite,pleasereadthehelpcontentsbygoingtothe menu entry Help -> Help Contents -> Using Automotive AVB Test Solutions -> TTsuite-AVB-AS
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
TIP:Ingeneral,thenumberofparametersinatestsuiteisbiganditisusefultofilterthedisplayedones.Bypressingthe“ShowUsedModuleParametersBasedonTestCaseSelection”button(seebelow)thelistisdrasticallyreduced.Anotherwayoffilteringtheparametersisbyusingthefiltertext.Forexample,ifonlytheDeviceunderTest(DUT)parametersaretobemodified,onecantype“DUT”inthefilterboxandfurtherreducethelistofdisplayedparameters.ThesameapproachcanbeusedifonlytheTestSystem(TS)parametersshouldbedisplayed.
7
2.1.3. Expected BehaviorOnceeverythingisconfigured,thetestcanberunbydoubleclickingonit,orbypressingtherunbutton.IftheconfigurationwascorrectlyandiftheDUTbehavescorrectly,messagesexchangedbetweentheTSandtheDUTareseeninthegraphicallogandthefinalverdictispass,asshownbelow.
Theusercanscrollthroughthereceivedmessagesandcheckthemindetailifdesired.
TIP: Generalinformationabouttheexecutionenvironment,howtoexecutetestcases,howtoreadandinterpretthegraphicallogging and much more can be found in the Help menu under: Help -> Help Contents -> Spirent TTworkbench User’s Guide -> Using TTworkbench TTman
Ifsomethingwentwrong,theverdictwillbefail. In the next section the most common reasons for failure are documented.
a. No messages are received from the DUT
IfnomessagesarereceivedfromtheDUT,thentherewillbeno“receive”eventsshowninthegraphicallog:noarrowsoriginatingfromtheSystemcomponentwithatextof“receive(…)”.Theverdictinsuchacaseisfailandseveralreasonsarelisted(e.g.,noFollow_Upmessageswerereceived,noPdelay_Respmessageswerereceived,etc.).Inthiscase,pleasecheckthephysicalconnectionandthatthecorrectinterfacenameisused(e.g.,“vEth0”).
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
b. Pdelaymessagesarereceived,butnoSyncorFollowUpmessages
WhenPdelayResponseandPdelayResponseFollowUpmessagesarereceivedfromtheDUT,butnoSyncorFollowUpmessagesarereceived,theverdictisalsofail,butonlytworeasonsarelogged(seebelow).Inthegraphicallogreceivedeventscanbeseen,andifonewillselectsuchaneventitcanseethedetailsofthereceivedmessage.Insuchascenario,themostprobablycauseisthattheDUTwaswronglyconfiguratedtobeaSlaveandnotaGM.
9
c. Allexpectedmessagesarereceived,butwithmismatches
Whensomeparameterswerewronglyconfigured(e.g.,theDUT’sclockidentityortheDUT’sportnumber),theverdictwillbefailand in the graphical log many received messages will be displayed in red as shown below.
Whenclickingonsucharedarrow,acomparisonbetweentheexpectedtemplateandtheactualreceivedmessagewillbedisplayedinthetestdatawindow.Itisveryeasytoidentifythewrongparameters.Intheexampleabove,theTSwasconfiguredtoexpectaclockidentityof0x001094FFFE000008,butitreceives0x001094FFFE000001fromtheDUT.Similarfortheportnumber,theTSexpects8,butitreceives1.Inthiscase,itisrequiredtoreconfigureeithertheTestSystemortheDUTsothatthetwoconfigurationsarealigned.
2.2. Conformance Testing: TTsuite-AVB-17222.2.1. Objective
IEEE1722-2016definesacommonheadersectionforallAVTPDUs,includingStreaming,ControlandAlternateheaders,insections5.4.1and5.4.2.Insection5.4.3itisdefinedtheCommonStreamHeaderformat.Thefieldsthatarepartofthiscommonsection of the header are presented below.
AVTPDU Common Stream Header.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Avnudefines15testcasescheckingtheconformanceofvariousfieldsinthecommonheader.ThesetestsarepartofthefirsttwosubgroupsoftestsfromtheTTsuite-AVB-1722testsuite.Theidentifierforeachtestcaseandthefield(s)inthecommonheadertargeted are presented in table below.
AED AVTP Common Header Talker Format Tests
(covers conformance requirements defined in sections 5.4.1 & 5.4.2 of IEEE 1722-2016)
TC_Auto_AVTP_c_5_1_1_A EtherType = 0 x 22F0
TC_Auto_AVTP_c_5_1_2_ASubtypeField!=0x7F(EF_STREAM)or0xFF(EF_CONTROL)
TC_Auto_AVTP_c_5_1_2_B SubtypeField=0x02(AAF)
TC_Auto_AVTP_c_5_1_2_C SubtypeField=0x03(CVF)
TC_Auto_AVTP_c_5_1_2_D SubtypeField=0x00(61883-4MPEG-TS)
TC_Auto_AVTP_c_5_1_2_E SubtypeField=0x04(CRF-A)
TC_Auto_AVTP_c_5_1_3_A Version Field
AED AVTP Common Stream Header Talker Format Tests
(covers conformance requirements defined in section 5.4.2 of IEEE 1722-2016)
TC_Auto_AVTP_c_5_2_1_A SV Bit
TC_Auto_AVTP_c_5_2_2_A MR Bit
TC_Auto_AVTP_c_5_2_3_A TV Bit & AVTP Timestamp Field
TC_Auto_AVTP_c_5_2_4_A SequenceNumberField
TC_Auto_AVTP_c_5_2_5_A TU Bit – DUT is GM
TC_Auto_AVTP_c_5_2_5_B TU Bit – No GM Present
TC_Auto_AVTP_c_5_2_5_C TU Bit – TS emulates a GM
TC_Auto_AVTP_c_5_2_6_A Stream Data Length Field
AVTP Common Header Test Cases.
2.2.2. Test Topology Thetestcasespresentedintableabovesharethesametesttopology&configurationandthesametestprocedure:DeviceunderTest(DUT)isaTalkerconnectedtotheTestSystem(TS)thatplaystheroleofaListener.TScaptureallthetrafficfromtheDUTfor10secondsandthenanalysesthespecificfieldsintheheaderofthereceivedframes,basedontherequirementsforeachtestcase.
TS emulating a Listener -------DUTemulatingaTalker
Sinceall1722testcasesareapplicableonlytoEndStations,onlyoneinterfaceneedstobeconfigurated,namely px_TS1_netDevice
Thefollowingparametersmustbeconfigured,basedonthecapabilitiesoftheDUT:
11
IftheDUTrequiresthepresenceofaGMinthenetworktobeabletosend1722streams,thenalsothegPTPparametersmustbeconfigurated.Pleasebeawarethatallthese15testcasesareexecutableonlyiftheDUTisaTalkerandonlyiftheparameterpx_DUT_isAEDT is set to true(AEDTstandsforAutomotiveEthernetDeviceTalker,AEDGMstandsforAutomotiveEthernetDeviceGrandMaster).
2.2.3. Expected BehaviorAftertheconfigurationiscompletethetestcasesarereadytobeexecutedeitherbydoubleclickingonthenameofthetestcaseorbypressingtherunbutton.Apop-upwindowappears,askingfortheTesterinterventiontotriggertheDUTtosendaAVTPstream:
AfterthestreamisstartedattheDUTtheTestercanpressOKandthetestwillcontinue.ThetestwillcaptureallthetrafficfromtheDUTforthenext10secondsandthenwillcheckallthecapturedframes.UsuallythenumberofframespersecondgeneratedbytheDUTisbig(e.g.,8000fps),henceitwillbeoverloadingfortheusertobepresentedwitheverysingleframecaptured.Forthisreason,inthegraphicallogonlyevery100thframeisdisplayedandcanbeanalyzedindetail.ScreenshotbelowshowsthelogforTC_Auto_AVTP_c_5_1_2_Awhereitischeckedthatthesubtypefieldhasavalidvalue(inthiscaseanyvaluebesidestheexperimentalonesof0x7Fand0xFF).Evenifnotdisplayedinthegraphicallogalltheframesarecapturedandanalyzed.ThewholecapturedtrafficissavedasapcapfileattachedtothelogandcanbeviewedbydoubleclickingontheINFOeventfromthe graphical log at the end of the log as highlighted in screenshot below.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Afterthecaptureisanalyzed,theuserispresentedwithapop-upwindowaskingifthereareanyotherstreamformatssupportedbytheDUTthatwerenotyettested.IfNoisselected,thetestcasewillstop.IfYesisselected,thenthetestwillberepeatedfortheuntested format.
Ifduringtheanalysisofthecapturedtrafficaframeisfoundthatisnotvalidornotexpectedatthatpointintimeduringtheexecutionofthetestcase,thatframewillbeimmediatelylogged(evenifitisnotamultipleof100).Theverdictwillbethensettofail and the test case will stop as shown in log below from the execution of test case TC_Auto_AVTP_c_5_1_2_B.
13
ThistestcaseexpectsanAAFstreamfromtheDUT(withthesubtypefieldsetto0x02),butitreceivesaframewithasubtypeof0x03(correspondingtoaCVFstream).Thatframeisimmediatelylogged,nootherframesareinspectedorlogged,theverdictisset to fail and the test case stops. This is the reason why only one frame can be seen in the graphical log. Nonetheless the whole trafficcapturedduringthe10seconds’periodisavailableinthepcapfileattachedtothelog.
2.3. Conformance Testing: TTsuite-AVB-FQTSS2.3.1. Objective
Thecredit-basedshaper(CBS)algorithmpacestrafficegressingfromaTalkerorBridgeport,wherethetrafficissensitivetotimelydelivery,andinparticular,requirestransmissionlatencytobebounded.ABridgeisrequiredtouseonecredit-basedshaperperSRclass,perPort,toshapetheoutboundtrafficperthesumofthecurrentlyreservedstreams.Thecredit-basedshaperqueueisalwaysahigherpriorityqueuethannon-CBSqueues.Aninterestingcornercaseforconformancetestingisthepresenceoflinerateinterferingtraffic–trafficwhichisnotpartofastreamreservation(SR)andthusmayalsobereferredtoasnon-SR,non-AVBorbackgroundtraffic.Theline-ratenon-SRtrafficnotonlyinterfereswiththetimingofSRtraffic,butalsointerfereswiththetransmissionofnecessaryslow-protocolssupporttrafficfromtheBridge(e.g.,gPTPtraffic).Toexaminethecorrectbehaviorofthecredit-basedshaper’soperationinthepresenceofnon-SRline-rateinterferingtraffic,thetestsystemmustcalculatethepropersizeofaSRburstfollowinganinterferingframe’stransmissionaswellascalculatethenumberofinterferingframesthatshouldoccurbetweenburstsofSRtraffic.
TestcaseTC_Auto_FQTSS_c_34_2_4_Bverifiesthatasinglecredit-basedshapertrafficclassproperlyfollowstheexpectedbehaviorfortheinputstreamsinthepresenceofmaximumframe-sized(1522Bytes)line-rateinterferingtrafficonegressport.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
2.3.2. Test Topology TestcaseTC_Auto_FQTSS_c_34_2_4_BrequiresthattheDUThasatleast3ports.IftheDUThasonly2portsavailable,testcaseTC_Auto_FQTSS_c_34_2_4_A should be run instead. The test topology is shown below.
ThreeportsoftheDUTneedtobeconnectedtothetestsystem.ThetesterneedstoconfiguretheDUTtoexpecttheSRtrafficforthetestedSRclassonDUTport2(ingress)forDUTport1(egress).Thereservedtrafficshouldbearound10%fromthebandwidthavailableforthetestedSRclass.Ifpossible,thetestershouldalsoconfigureDUTport3tooperateatahigherspeedthanDUTport1(e.g.,DUTport1operatesat100MbpsandDUTport3operatesat1Gbps).
AftertheDUTisproperlyconfigured,theTestSystemmustbeconfiguredaccordingly.BeforeloadingthedefaulttestcampaignFQTSS_Testcases.clflocatedinsidetheclffolder,pleasemakesurethatlocalexecutionisselected.Thiscanbeachievedbygoingto the menu entry Window -> Preferences -> TTCN-3 -> Execution – TTman -> Engineandbesuretoselect“ThisTTworkbench(Localexecution)”,ashighlightedbelow.
15
ThesettingsforeachTSportshouldbefilledin:
TheframesizefortheSRtrafficmaybeconfigured.Anyvaluebetween68and1522isvalid.Ifthereisnointerestintoaparticularframe size then the default value could be used.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
AtleastoneSRclasshastobeconfiguredandtheisSupportedfieldhastobesettotrue.
ThelaststepistoconfigurethespeedforeachportontheDUT.IftheforwardingrateofDUTport1islowerthanthelinerateatDUTport1,thanbothvaluesneedtobeconfiguredaccordingly.
FormoredetailedinformationabouteachparameterandonhowtoconfigureandruntestcasesfromTTsuite-AVB-FQTSStestsuiteingeneral,pleasereadthehelpcontentsbygoingtothemenuentryHelp -> Help Contents -> Using Automotive AVB Test Solutions -> TTsuite-AVB-FQTSS.
17
2.3.3. Expected BehaviorAftertheconfigurationiscomplete,thetestcasesarereadytobeexecutedeitherbydoubleclickingonthenameofthetestcaseorbypressingtherunbutton.Twopop-upwindowsappear,askingfortheTesterinterventiontoconfiguretheDUT.
IftheconfigurationoftheDUTwasdoneasindicatedinthepreviouschapter,thennoactionneedstobetakenatthisstage.Ifnot,pleaseconfiguretheDUTtoexpectastreamfromTS2toTS1consumingapproximately10%ofthetotalavailableSRclassbandwidthatDUTport1.Ifpossible,thetestershouldalsoconfigureDUTport3tooperateatahigherspeedthanDUTport1(e.g.,DUTport1operatesat100MbpsandDUTport3operatesat1Gbps).
Thegraphicallogisshownbelow.Atthebeginningofthelogarepresentedseveralcallstoconfigurethegeneratorandanalyzerontherightports.Thenthegeneratorandanalyzerarestartedandstoppedaccordingtothetestcasesteps.ApcapfilewithallthetrafficcapturedatTSport1issavedintheCapturesfolder.Thenamestartswiththenameofthetestcaseandatimestampisaddedassuffix.Thekeypartofthetestcaseistheanalysisofthecapturedtrafficwiththepurposeofidentifyinganobservationwindow.ThroughoutthewholeFQTSStestplan,testscallfortheobservationofthenumberofframespersecondseenwithinanobservationwindow,typically1second,wherethatobservationwindowdoesnotstartorendwithinΔtmaxofaprecedinginterferingframe(toavoidburstsofSRframesfollowingamaxnon-SRframe).Whensuchanobservationwindowisidentified,thedetails are logged as an ObservationWindowInfoType message. This message contains detailed statistics about the observation window:
• Duration of the observation window in seconds.• Thestartoftheobservationwindow,intheformoftheindexinsidethepcapfileforthefirstpacketinsidetheobservation
window.• Theendoftheobservationwindow,intheformoftheindexinsidethepcapfileforthelastpacketinsidetheobservation
window.• Interframegaps:totalnumberofgaps,theaverageinterframegapinnanosecondsandthestandarddeviationforthe
interframe gaps.• The total number of bytes received in the observation window.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
IfthenumberofSRframesreceivedintheobservationwindowiswithintheexpectedlimits,theverdictsispass,asshownbelow:
IfthenumberofSRframereceivedinsidetheobservationwindowislargerorsmallerthanwhatisexpected,thentheverdictswillbe set to fail.
FordetailedinformationonhowthelimitsoftheobservationwindowaredefinedandhowtocomputetheexpectednumberofSRframesinsideit,pleasereadAnnexEandFfromtheAvnu’s“BridgeTestPlanforAutomotiveSRClassesandForwardingandQueuingEnhancementsforTime-SensitiveStreams”—Version0.1.1.
19
3. Timing and SynchronizationOverview
IEEE802.1AS(gPTP)isthestandardfortransportofprecisetimingandsynchronizationinAudio/VideoBridging(AVB)networks.
IEEE802.1ASstandardspecifiestheprotocolandproceduresusedtoensurethatthesynchronizationrequirementsaremetfortime-sensitiveapplications,suchasaudioandvideo,acrossbridgednetworks.ItenablesstationsattachedtobridgedLANstomeettherespectivejitter,wander,andtimesynchronizationrequirementsfortime-sensitiveapplications.Thisincludesapplications that involve multiple streams delivered to multiple endpoints.
IEEE802.1ASisexpectedtobeusedintheinfotainmentanddiagnosticportionsofautomotivenetworksforthepurposesoftimingsynchronizationamongstelementssuchasvideosources,screens,speakersandECUs.ForAVsystems,synchronizationiscriticalduetothehumansensitivitytoAVlipsynchingandstereosounds.Fordiagnosticsystems,thepurposeofsynchronizationis for logging of diagnostic events.
OftentheGrandmasterfunctionwillbefixedinagatewayorswitchingchip.SlavefunctionswillbeperformedbydevicessuchasECUs,cameras,andvideoscreens.UserswillwanttotestGrandmasterandSlavefunctionality.
3.1. IEEE802.1AS Synchronization Testing Theory of Operation
TheprotocoldefineseventandgeneralPTPmessages.Eventmessagesaretimedmessagesinthatanaccuratetimestampisgeneratedatbothtransmissionandreceipt.Generalmessagesdonotrequireaccuratetimestamps.
The set of event messages consists of:• Sync • Pdelay_Req• Pdelay_Resp
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
The set of general messages consists of:• Announce • Follow_Up • Pdelay_Resp_Follow_Up
TheSync,Follow_Up,andPdelay_Respmessagesareusedtogenerateandcommunicatethetiminginformationneededtosynchronizeordinaryandboundaryclocksusingthedelayrequest-responsemechanism.
ThePdelay_Req,Pdelay_Resp,andPdelay_Resp_Follow_Upmessagesareusedtomeasurethelinkdelaybetweentwoclockportsimplementingthepeerdelaymechanism.TheclocksthatimplementthepeerdelaymechanismcansynchronizeusingthemeasuredlinkdelaysandtheinformationintheSyncandFollow_Upmessages.TheAnnouncemessageisusedtoestablishthesynchronization hierarchy.
There are two phases in the normal execution of the protocol:• Establishing the master-slave hierarchy• Synchronizingtheclocks
Withinadomain,eachportexecutesanindependentcopyoftheprotocolstatemachine.For“statedecisionevents,”eachportexaminesthecontentsofallAnnouncemessagesreceivedontheport.Usingthebestmasterclockalgorithm,theAnnouncemessagecontentsandthecontentsofthedatasetsassociatedwiththeclockareanalyzedtodeterminethestateofeachportoftheclock.
InaPTPsystem,theclockssynchronizebyexchangingPTPtimingmessagesonthecommunicationpathlinkingthetwoclocks.
Sample IEEE802.1AS Network.
Relevant Standards• 802.1AS-2011• IEEE-1588-2008
21
3.1.1. Test Case: Test DUT for Master Role
OverviewOneSpirentTestCenterportisrequired,theportonSpirentTestCenteremulatesgPTPSlave.ItisconnectedtotheDUTwhichcanact as gPTP Master. DUT and Spirent TestCenter port exchange the gPTP messages. DUT and Spirent TestCenter gPTP emulation are expected to run Best Master Selection Algorithm.
ObjectiveTheobjectiveofthetestistoverifythecapabilityofDUTtoactasagPTPMaster.TheexampleconfigurationwillemulatesinglegPTPmasterandslavepair,butitcanbeeasilyexpandedtotestmultiplegPTPdevicesinthenetwork.
Topology
DUT at Grandmaster
Step-by-Step InstructionsApplication Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.b. Add Spirent TestCenter port connected to a port of DUT.c. Add a device on port.
StepstoconfigureIEEE802.1ASonSpirentTestCenterport:a. Select the IEEE802.1AS technology on gPTP Device.
b. Adjust Priority1 on Spirent TestCenter device to be higher than the Priority1 on DUT.
c. Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenter.UsetheDefaultsettingsonDUTaswell.
d. Apply and Start all devices.
e. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results.
f. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueof
Maximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold.
Verify Resultsa. VerifytheClockStateofSpirentTestCenterdeviceintheresultsis“Slave”.
b. Verify that the corresponding DUT port becomes a Master.
c. VerifyfrompacketcapturethatonlytheMastertransmitsAnnounce,SyncandFollow_up.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
3.1.2. Test Case: Test DUT for Slave Role
OverviewOneSpirentTestCenterportisrequired,theportonSpirentTestCenteremulatesgPTPMaster.ItisconnectedtotheDUTwhich can act as gPTP Slave. DUT and Spirent TestCenter port exchange the gPTP messages. DUT and Spirent TestCenter gPTP emulaton are expected to run Best Master Selection Algorithm.
ObjectiveTheobjectiveofthetestistoverifythecapabilityofDUTtoactasagPTPSlave.TheexampleconfigurationwillemulatesinglegPTPmasterandslavepair,butitcanbeeasilyexpandedtotestmultiplegPTPdevicesinthenetwork.
Topology
DUT at Slave.
Step-by-Step InstructionsApplication Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.b. Add Spirent TestCenter port connected to a port of DUT.c. Add a device on port.
StepstoconfigureIEEE802.1ASonSpirentTestCenterport:a. Select the IEEE802.1AS technology on gPTP Device.
b. Adjust Priority1 on Spirent TestCenter device to be lower than the Priority1 on DUT.c. Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenter.UsetheDefaultsettingsonDUTaswell.d. Apply and Start all devices.e. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results.
f. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueofMaximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold.
Verify Resultsa. VerifytheClockStateofSpirentTestCenterdeviceintheresultsis“Slave”.
b. Verify that the corresponding DUT port becomes a Master.
c. VerifyfrompacketcapturethatonlytheMastertransmitsAnnounce,SyncandFollow_up.
23
3.1.3. Test Case: Test DUT for Slave Role in Automotive Profile
OverviewOneSpirentTestCenterportisrequired,theportonSpirentTestCenteremulatesgPTPMasterinAutomotiveprofile.ItisconnectedtotheDUTwhichcanactasgPTPSlaveinAutomotiveprofile.DUTandSpirentTestCenterportexchangethegPTPmessages. DUT and Spirent TestCenter gPTP emulation are not expected to run Best Master Selection Algorithm.
ObjectiveTheobjectiveofthetestistoverifythecapabilityofDUTtoactasagPTPSlaveinAutomotiveprofile.TheexampleconfigurationwillemulatesinglegPTPmasterandslavepair,butitcanbeeasilyexpandedtotestmultiplegPTPdevicesinthenetwork.
Topology
DUT as Slave in Automotive Profile.
Step-by-Step InstructionsApplication Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.
b. Add Spirent TestCenter port connected to a port of DUT.
c. Add a device on port.
StepstoconfigureIEEE802.1ASonSpirentTestCenterport:a. Select the IEEE802.1AS technology on gPTP Device.
b. SelectAutomotiveprofileandde-selectSlaveonlyoption.
c. ConfiguretheDUTinAutomotiveprofileforgPTPinslavemode.
d. Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenter.UsetheDefaultsettingsonDUTaswell.
e. Apply and Start all devices.
f. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results.
g. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueof
Maximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold.
Verify Resultsa. VerifytheClockStateofSpirentTestCenterdeviceintheresultsis“Master”.
b. Verify that the corresponding DUT port becomes a Slave.
c. VerifyfrompacketcapturethatonlytheMastertransmitsSyncandFollow_up.
d. Verify that no Announce messages are transmitted.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
3.1.4. Test Case: Test DUT for Master Role in Automotive Profile
OverviewOneSpirentTestCenterportisrequired,theportonSpirentTestCenteremulatesgPTPSlaveinAutomotiveprofile.ItisconnectedtotheDUTwhichcanactasgPTPMasterinAutomotiveprofile.DUTandSpirentTestCenterportexchangethegPTPmessages.DUT and Spirent TestCenter gPTP emulation are not expected to run Best Master Selection Algorithm.
ObjectiveTheobjectiveofthetestistoverifythecapabilityofDUTtoactasagPTPMasterinAutomotiveprofile.TheexampleconfigurationwillemulatesinglegPTPmasterandslavepair,butitcanbeeasilyexpandedtotestmultiplegPTPdevicesinthenetwork
Topology
DUT at Grandmaster in Automotive Profile.
Step-by-Step InstructionsApplication Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.b. Add Spirent TestCenter port connected to a port of DUT.c. Add a device on port.
StepstoconfigureIEEE802.1ASonSpirentTestCenterport:a. Select the IEEE802.1AS technology on gPTP Device.b. SelectAutomotiveprofileandkeeptheSlaveonlyoptionselected.
c. ConfiguretheDUTinAutomotiveprofileforgPTPinMastermode.d. Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenter.UsetheDefaultsettingsonDUTaswell.e. Apply and Start all devices.f. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results.
g. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueofMaximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold.
Verify Resultsa. VerifytheClockStateofSpirentTestCenterdeviceintheresultsis“Slave”.
b. Verify that the corresponding DUT port becomes a Master.c. VerifyfrompacketcapturethatonlytheMastertransmitsSyncandFollow_up.d. Verify that no Announce messages are transmitted.
25
3.2. IEEE802.1AS Scalability TestingHow gPTP works at a high levelThere are two phases in the normal execution of the protocol:
• Establishingthemaster-slavehierarchy,whichisdoneusingBMCA• Synchronizingtheclocks
IEEE802.1AS Grandmaster Selection (BMCA)
IEEE802.1ASusesBestMasterClockAlgorithmforselectingaGrandmaster.
For“statedecisionevents”,eachportexaminesthecontentsofallAnnouncemessagesreceivedontheport.UsingtheBestMasterClockAlgorithm,theAnnouncemessagecontentsandthecontentsofthedatasetsassociatedwiththeclockareanalyzedtodeterminethestateofeachportoftheclock.
The BMCA determines the grandmaster for a gPTP domain and constructs a time-synchronization spanning tree with the grandmaster as the root. Synchronized time is transported from the grandmaster to other time-aware systems via the time-synchronization spanning tree. Best master selection information is exchanged between time-aware systems via Announce messages.
OnceanAnnouncemessageistransmittedbyaport,subsequenttiminginformationtransmittedbythatportshallbederivedfrom the grandmaster indicated in that Announce message.
IftheSlavedoesnotreceiveAnnouncemessageswithintheTimeoutintervalforAnnounce,theSlavemovesintoListeningstate,assumingthereisnoMaster.BelowishowAnnounceReceiptTimeoutworks.
AnnounceReceiptTimeout
ThevalueofthisattributetellsaslaveportthenumberofannounceintervalstowaitwithoutreceivinganAnnouncemessage,beforeassumingthatthemasterisnolongertransmittingAnnouncemessages,andthattheBMCalgorithmneedstoberun,if appropriate. The condition of the slave port not receiving an Announce message for announceReceiptTimeout announce intervals is referred to as announce receipt timeout.
Synchronizing the Clocks
InaPTPsystem,theclockssynchronizebyexchangingPTPtimingmessagesonthecommunicationpathlinkingthetwoclocks.
TheprotocoldefineseventandgeneralPTPmessages.Eventmessagesaretimedmessagesinthatanaccuratetimestampisgeneratedatbothtransmissionandreceipt.Generalmessagesdonotrequireaccuratetimestamps.
The set of event messages consists of:• Sync • Pdelay_Req• Pdelay_Resp
The set of general messages consists of:• Announce • Follow_Up • Pdelay_Resp_Follow_Up
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
TheSync,Follow_Up,andPdelay_Respmessagesareusedtogenerateandcommunicatethetiminginformationneededtosynchronizeordinaryandboundaryclocksusingthedelayrequest-responsemechanism.
ThePdelay_Req,Pdelay_Resp,andPdelay_Resp_Follow_Upmessagesareusedtomeasurethelinkdelaybetweentwoclockportsimplementingthepeerdelaymechanism.TheclocksthatimplementthepeerdelaymechanismcansynchronizeusingthemeasuredlinkdelaysandtheinformationintheSyncandFollow_Upmessages.TheAnnouncemessageisusedtoestablishthesynchronization hierarchy.
27
Sample gPTP Network
Sample IEEE802.1AS Network.
Relevant Standards• 802.1AS-2011• IEEE-1588-2008
3.2.1. Test Case: Test gPTP Scalability Overview
Twoback-to-backconnectedSpirentTestCenterportsarerequiredfortestingthescalability.Port1hasonedeviceonitandemulatesagPTPMaster.Port2canhavemultipledevicesonit,emulatinggPTPslaves.ThistopologycreatesascenariowhereonegPTP Master is serving Multiple gPTP Slaves. The Master and Slave devices exchange PTP messages.
Objective
The objective of the test is to verify the Max number of Slaves that can be supported by Spirent TestCenter emulation of gPTP protocol. Example topology below shows a gPTP Master serving three multiple Slaves. The same is extended in the test case to serve150gPTPSlavedevices.TheconfigurationwillemulatesinglegPTPMasterdeviceconnectedtomultipleSlavedevicesinthenetwork.
ThedefaultconfigurationofgPTP,messagesareexchangedattheof1pps.However,thetestcaserequiresmultipledevicesconfiguredinthenetwork,exchangingSync,Follow_UpandPDelaymessagesattherateof16pps.Sincethenetworkisbeingbombardedwithahighrateofmessages,itcreatesanoccasionaldelayinreceivingmessages.IftheSlavedoesnotreceiveAnnouncemessageswithintheTimeoutintervalforAnnounce,theSlavemovesintoListeningstate,assumingthereisnoMaster. This experiment can help determine the max number of Slave devices that can be supported with the above-mentioned configuration.HowAnnounceReceiptTimeoutworkshasbeenexplained.
Topology
Multiple gPTP Slaves.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Step-by-Step Instructions
Application Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.
b. AddtwoSpirentTestCenterports.Makesuretheportsareback-to-backconnected. Alternatively,thesameconfigurationcanbecreatedusingaDUT.ConnectPort1onSpirentTestCentertoaDUT,whichwillbea AVB switch. Connect the DUT to Port 2 on Spirent TestCenter.
c. Add one device on port1.
d. Add 150 devices on port2.
• ClickonAllDevices,gotoAddMultipledevices:
• Select port2
29
• Select Upper layer encapsulation as None.
• ConfigureDevices.SelectDeviceblockmodeas“Onedeviceperblock”.SettheMACAddresstoincrementin steps of 1.
• PreviewthedevicesconfiguredandclickFinish.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Steps to Configure IEEE802.1AS on Spirent TestCenter Port:
a. Select the technology as IEEE802.1AS.
b. IEEE802.1ASconfigurationsonPort1Emulateddevice:
• Priority 2 = 100
• Log Sync Interval = -4• LogMinimumPdelayRequestInterval=-4
• Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenterfortheEmulateddeviceonPort1.c. IEEE802.1ASconfigurationsonPort2Emulateddevices:
• Select SlaveOnly as true on all the devices on Port2. Todothis,enableSlaveonlyonfirstdeviceofPort2,selectalldevicesusingshiftkey,rightclickandcopydown. This enables Slave only option on all devices.
31
• SelectPriority1fieldonallthedevices,andrightclick.Thereisanoptiontofillincrementedvaluesforeachdeviceforthefieldselected,asshownbelow.Basically,itistoensurethatMasterhaslowestpossiblevalueofPriority1.SlavedevicesareconfiguredwithvaluesgreaterthanthePriority1onMaster.
• Log Sync Interval = -4 on all the devices on Port2.
• LogMinimumPdelayRequestInterval=-4onalldevicesonPort2.
• Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenterforalltheEmulateddevicesonPort2.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
d. IfaDUTisbeingused,configuretheportonDUTconnectedtoSpirentTestCenterPort1tobeaSlave.AlsoconfigurePriotity1onDUTportssuchthatitislessthanthePriority1onSpirentTestCentermasterport.ConfigureSyncandPDelayRequestmessagestobesentattherate16pps.
e. Apply and Start all devices.
f. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results.
g. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueofMaximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold.
Verify Results
a. VerifytheClockStateofSpirentTestCenteremulateddeviceonPort1intheresultsis“Master”.
• ClockStatecanbeverifiedfromthemainUIofIEEE802.1ASaswell.
b. VerifytheClockStateofSpirentTestCenteremulateddevicesonPort2fromresults.TheClockStateofallthedevicesshouldbe Slave.
c. VerifythattheClockstateisstableonalldevices.Thisindicatesthatthenetworkcanstillhandlethehighermessageratesforthenumberofdevicesconfigured.
33
d. CapturepacketsontheMasterportandverifythatonlyMastercontinuestosendAnnouncemessages. Startandstopthecaptureontheportandviewthecapturedpcapfiletoverify.
e. Add another 150 number of Slave devices on Port2 and apply.
f. ObservetheClockState.VerifythattheClockstateonSlaveschangestoListeningonceineveryfewseconds.Thisisduetothecongestioncreatedinnetworkcausedbyinjectingmessagesathigherrateandconfiguringmorenumberofdevices.WhentheSlavedevicesdonotreceiveAnnouncemessageswithintheTimeoutperiod,theclockstatemovesto“Listening”since it assumes there is no Master.
g. Verify from the capture that Slave devices start sending Announce messages for initiating a BMCA again.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
3.3. IEEE802.1AS Grandmaster Selection TestingHow gPTP works at a high levelThere are two phases in the normal execution of the protocol:
• Establishingthemaster-slavehierarchy,whichisdoneusingBMCA• Synchronizingtheclocks
IEEE802.1AS Grandmaster Selection (BMCA)
IEEE802.1ASusesBestMasterClockAlgorithmforselectingaGrandmaster.
For“statedecisionevents”,eachportexaminesthecontentsofallAnnouncemessagesreceivedontheport.Usingthebestmasterclockalgorithm,theAnnouncemessagecontentsandthecontentsofthedatasetsassociatedwiththeclockareanalyzedtodeterminethestateofeachportoftheclock.
The BMCA determines the grandmaster for a gPTP domain and constructs a time-synchronization spanning tree with the grandmaster as the root. Synchronized time is transported from the grandmaster to other time aware systems via the time-synchronization spanning tree. Best master selection information is exchanged between time-aware systems via Announce messages.EachAnnouncemessagecontainstime-synchronizationspanningtreevectorinformationthatidentifiesonetime-awaresystemastherootofthetime-synchronizationspanningtreeand,ifthetime-awaresystemisgrandmaster-capable,thegrandmaster.Eachtime-awaresysteminturnusestheinformationcontainedintheAnnouncemessagesitreceives,alongwithitsknowledgeofitself,tocomputewhichofthetime-awaresystemsthatithasknowledgeofshouldbetherootand,ifgrandmaster-capable,thegrandmaster.
OnceanAnnouncemessageistransmittedbyaport,subsequenttiminginformationtransmittedbythatportshallbederivedfrom the grandmaster indicated in that Announce message.
systemIdentity
ThesystemIdentityattributeofatime-awaresystemisaUInteger112(i.e.,a14-byte,unsignedinteger)formedbyconcatenatingthefollowingattributes,inthefollowingorder,frommostsignificanttoleastsignificantbit:
a. priority1:Auserconfigurabledesignationthataclockbelongstoanorderedsetofclocksfromwhichamasterisselected
b. clockClass:Anattributedefiningaclock’sTAItraceability
c. clockAccuracy:Anattributedefiningtheaccuracyofaclock
d. offsetScaledLogVariance:Anattributedefiningthestabilityofaclock
e. priority2:Auserconfigurabledesignationthatprovidesfinergrainedorderingamongotherwiseequivalentclocks
f. clockIdentity:Atie-breakerbasedonuniqueidentifiers
ThesystemIdentityattributeisdefinedforconveniencewhencomparingtwotime-awaresystemstodeterminewhichisabettercandidateforrootandifthetime-awaresystemisgrandmaster-capable(i.e.,thevalueofpriority1islessthan255).Twotime-aware systems are compared as follows.
35
LetthesystemIdentityoftime-awaresystemAbeSAandthesystemIdentityoftime-awaresystemBbeSB.LettheclockIdentityofAbeCAandtheclockIdentityofBbeCB.Then,ifCA≠CB,i.e.,AandBrepresentdifferenttime-awaresystems:
g. AisbetterthanBifandonlyifSA<SB,and
h. B is better than A if and only if SB < SA.
IfCA=CB,i.e.,AandBrepresentthesametime-awaresystem:
i. SA<SBmeansthatArepresentsanupgradingofthetime-awaresystemcomparedtoBor,equivalently,Brepresentsadowngradingofthetime-awaresystemcomparedtoA,
j. SB<SAmeansthatBrepresentsanupgradingofthetime-awaresystemcomparedtoAor,equivalently,Arepresentsadowngradingofthetime-awaresystemcomparedtoB,and
k. SA = SB means that A and B represent the same time-aware system that has not changed.
Comparisonsg)andh)aboveimplythat,withtheorderingofattributesinthesystemIdentity,theclockIdentityisatie-breakerforthecasewheretwodifferenttime-awaresystemsthathaveidenticalattributesa)throughe)arecompared.
Comparisonsg)andh)alsoimplythatatime-awaresystemthatisgrandmaster-capableisalwaysbetterthananothertime-awaresystemthatisnotgrandmaster-capable,becausethepriority1islessthan255ifthetimeawaresystemisgrandmaster-capableand 255 if it is not grandmaster-capable.
The cases where A and B represent different time-aware systems and represent the same time-aware system are handled separatelyintheBMCA.Whencomparingtwodifferenttime-awaresystems,thebettertimeawaresystemisselectedasthegrandmastercandidate.However,ifAandBrepresentthesametime-awaresystemwithattributesthathavechanged,thetime-awaresystemisconsideredashavingthemostrecentattributeswhendoingsubsequentcomparisonswithothertime-awaresystems.
Synchronizing the Clocks
InaPTPsystem,theclockssynchronizebyexchangingPTPtimingmessagesonthecommunicationpathlinkingthetwoclocks.
TheprotocoldefineseventandgeneralPTPmessages.Eventmessagesaretimedmessagesinthatanaccuratetimestampisgeneratedatbothtransmissionandreceipt.Generalmessagesdonotrequireaccuratetimestamps.
The set of event messages consists of:• Sync • Pdelay_Req• Pdelay_Resp
The set of general messages consists of:• Announce • Follow_Up • Pdelay_Resp_Follow_Up
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
TheSync,Follow_Up,andPdelay_Respmessagesareusedtogenerateandcommunicatethetiminginformationneededtosynchronizeordinaryandboundaryclocksusingthedelayrequest-responsemechanism.
ThePdelay_Req,Pdelay_Resp,andPdelay_Resp_Follow_Upmessagesareusedtomeasurethelinkdelaybetweentwoclockportsimplementingthepeerdelaymechanism.TheclocksthatimplementthepeerdelaymechanismcansynchronizeusingthemeasuredlinkdelaysandtheinformationintheSyncandFollow_Upmessages.TheAnnouncemessageisusedtoestablishthesynchronization hierarchy.
37
Sample gPTP Network
Sample IEEE802.1AS Network.
3.3.1. Test Case: Test for Grandmaster SelectionOverview
OneSpirentTestCenterportisrequired,theportonSpirentTestCenterisconnectedtotheDUT.TheBMCAparametersareadjusted to demonstrate the Grand Master Selection capabilities. DUT and Spirent TestCenter port exchange the gPTP messages. TheBestMasterSelectionAlgorithmdeterminestheclockstatesoftheDUTandSpirentTestCentergPTPemulation.
Objective
The objective of the test is to verify the BMCA and Grandmaster selection algorithm. Below are the two example topologies that can be created by adjusting the BMCA parameters accordingly. The same examples can be easily expanded to test multiple gPTP devicesinthenetwork.
Topology 1
DUT as Slave.
Topology 2
DUT at Grandmaster.
Topology 3
Multiple gPTP Slaves.
Relevant Standards• 802.1AS-2011• IEEE-1588-2008
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Step-by-Step Instructions
Application Launch & Adding Portsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.
b. Add Spirent TestCenter port connected to a port of DUT.
c. Add a device on port.
StepstoconfigureandverifyIEEE802.1ASonSpirentTestCenterporta. Select the IEEE802.1AS technology on gPTP Device.
SpirentTestCenterallowstoconfigurethebelowBMCAparameters:
b. ConfigurethePriority1valueonSpirentTestCenterdevicetobelowerthanthePriority1onDUT. Inthisexample,Priority1onSpirentTestCenterportis1andthePriority1onDUTis128:
c. Forallotherparameters,usetheDefaultconfigurationonSpirentTestCenter.UsetheDefaultsettingsonDUTaswell.
d. Apply and Start all devices.
e. Monitor the value of Maximum Mean Path Delay from IEEE802.1AS results:
f. SetthevalueofNeighborPropagationDelayThresholdtoavaluegreaterthanMaximumMeanPathDelay,ifthevalueofMaximum Mean Path Delay is greater than the Default value of Neighbor Propagation Delay Threshold:
g. VerifytheClockStateofSpirentTestCenterdevicefromresults.TheClockStateshouldbeMastersincePriorty1onSpirentTestCenter Port < Priority 1 on DUT:
39
ThesamecanbeverifiedfromIEEE802.1ASresultsaswell:
h. VerifythatthecorrespondingDUTportbecomesaSlave.Thisconfigurationcreatesthetopologydepictedin Topology 1.
i. VerifyfrompacketcapturethatonlytheMastertransmitsAnnounce,SyncandFollow_up.
j. Nowadjusttheconfiguration.ConfigurethePriority1valueonSpirentTestCenterdevicetobehigherthanthePriority1onDUT. In this example Priority1 on Spirent TestCenter port is 200 and the Priority1 on DUT is 128:
k. Apply.
l. ObservethattheClockstateofSpirentTestCentergPTPemulationhaschangedtoSlave.ThereasonforthisisthatthePriority1 on Spirent TestCenter > Priority1 on DUT.
m. Also,verifythatthecorrespondingportonDUTbecomesaMaster.ThiscreatesthetopologydepictedinTopology2.
n. Other BMCA parameters can also be adjusted to observe similar results.
o. The same experiment can be extended to multiple devices as shown in Topology 3.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
3.4. IEEE802.1AS Bridge Performance Testing3.4.1. Test Case: Test DUT for Time-Aware Bridge gPTP Timing Performance
Overview
OneSpirentParagon-Xisrequired,performinghigh-accuracyemulationofgPTPMasterandSlaveend-points.Itisconnectedtothe DUT acting as a gPTP time-aware bridge. DUT and Spirent Paragon-X exchange gPTP messages.
Objective
The objective of the test is to verify the gPTP timing accuracy of the DUT. Performance tests in steady-state and with controlled impairmentsontheinputtotheDUTarerecommended.Theexampleconfigurationtestsusingasingleflow,butcanbeeasilyexpandedusingSpirentTestCentertoemulateadditionalflowsforscaletesting,asexplainedelsewhereinthisdocument.
Topology
DUT as Time-Aware Relay.
41
Step-by-Step Instructions
Connectionsa. Connectport1(mastersideofParagon-X)totheTimeAwareRelay‘Slave’side.
b. Connectport2(slavesideofParagon-X)totheTimeAwareRelay‘Master’side.
c. Connectexternalreferencee.g.,10MHztoParagon-Xrefinput.
d. IfprovisionedonDUT,connect1ppsoutputfromDUTto1ppsmeasurementport(Aux).Useconverteraccessoryifrequired.(Itisassumedthatthe1ppsshouldtrackthePTPoutput,andhencethesameoutputlimitsareusedforboth)
e. IfprovisionedonDUT,connectFreqe.g.,E1outputfromDUTtoFreqmeasurementportattherearoftheParagon-X.
StepstoConfigureIEEE802.1ASPerformanceTestswithSpirentParagon-Xa. Launch Paragon-X application.
b. Select Start Up and Connect.
c. EnterIPaddressofParagon-X(displayedonParagon-Xstatusdisplay)
d. Select Setup Interface and select Line Rate to match system under test.
e. SelectReferencestabtoconfigureastablereferenceforParagon-X,settheClockSourcetoExternalreference(10MHzorE1/2MHz).
f. SelectOperatingMode,1588v2,EnableMaster/SlaveEmulationthenClose.
g. SelectMeasurements,thenanydesiredsimultaneousmeasurementsinadditiontoPTPbasedmeasurements,e.g.,E1Wander,1ppsAccuracy(ifavailablefromDUT).
h. SelectMaster/SlaveEmulation.ChooseTimeAwareBridgeinTestConfigurationdropdownmenu.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
i. Select802.1AS(gPTP)profilefromProfileConfigurationdrop-down.
j. Enter DUT to Spirent Paragon-X Cable Delay. Values of 5nS per 1 meter of electrical cable and 4nS per 1 meter of optical cable can be expected.
• If1ppsTimeErrormeasurementsaretobemade,enterthe1ppsMeasurementCableDelay Values of 5nS per 1 metre of cable can be expected. See the Tech Note Cabling Considerations Document [CX5009] for more information.
k. Start the Master/Slave emulation.
l. WaitfortheDUTtolocktotheParagon-XemulatedMasterandstabilizebeforemakinganymeasurements.
43
Verify Results
ThetestrecommendationsinthisdocumentdetailmeasurementsthatshouldbecarriedouttoverifyperformanceasdefinedinIEEE802.1AS,aswellasforfurtherinsightintodeviceperformance.MeasurementsareactionedusingtheStartmeasurementbuttonandshouldbeexecutedfortheperiodasspecified.
a. Toanalysetheresults,selectTools,CalnexAnalysisTool(1588v2)andTimeErrorMeasurementtool.
b. VerifyForwardCorrectionFieldAccuracy(T1TimeError),PeerDelayTurnaroundTimeAccuracy,andNeighborRateRatio(NRR)Accuracy.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
1pps versus PTPIt is important to prove performance via the egress PTP as this is the signal that is used downstream to recover the time. If provisioned,the1ppsoutputfromtheDUTshouldaccuratelyreflecttheperformanceofthetimingbeingdeliveredbytheegressPTPpacketflow.Onceinservice,theperformancecanbemonitoredbythis1ppsoutputsoitisimportanttoalsoproveitisanaccuratereflectionofperformanceontheline.
Further Analysis (Optional)
a. PFVtoolcanbelaunchedtocheckcapturedPTPdataforconformanceto802.1ASprofile
b. Oncedatahasbeencaptured,launchPFVfromTools->PTPFieldVerifier
c. Oncelaunched,ifnotalreadyselected,chooseIEEE802.1ASfromthedropdownlist
45
d. Areasofnon-conformancewillautomaticallybehighlightedinred,withdetailsofthefailureprovidedviahover-over.
e. ForfurtherdetailsonusingPFV,includingReportGeneration,seethePFVGettingStartedGuideavailableintheuserinterface from >Help
f. To enable impairments press the Add Impairments/Delay button
This will display the Impairments control screen.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
g. EnabletheMasterTXDelayortheMasterRXDelayfeatureusingthetickboxesshownabove.SelectwhichoneyouwantbyclickingonthewordDelay.Theselecteddirectionwillbehighlightedas:
h. Select Flow Filter to select the messages to apply delays against.
i. TheImpairmentengineisnowprimedandisreadytoimportdelayprofilesifrequiredasdefinedin,e.g.,TimeNoiseTolerance tests.
47
Note: Delay ProfilesDelayProfilescanbeobtainedfromtheCalnexwebsite,capturedusingParagon-X,orcreatedusingPDVEditortoolintheuserinterface or directly in the Delay tab of the Add Impairments/Delay window.
a. Return to the Test Setup page using the Master/Slave Emulation button on the left of the display. This will display the Test setup page.
b. Start the Master/Slave emulation.
c. SelecttheMasterTXDelaythenUserdefinedandImport.Inthefilebrowserwindow,navigatetothelocationofthestoredprofileandselecttheprofileobtainedfromCalnex.
d. Oncethefilehasbeenloaded,starttheimpairmentbyselecting
Verify Results
• DUT should maintain reference and not be subjected to switching reference or enter holdover state. This must be determinedfromthedeviceitself(e.g.,viathemanagementinterface).
• BysimultaneouslyrunningaCapture/Measurement,PerformanceofgPTP(and1ppsifavailable)outputcanbetestedaspertheNoiseGenerationmethoddescribedearlierinthisdocument,althoughexpectedperformancemayvary.
• Ifdesirednoisetransferperformanceisknown,thendefinedimpairmentprofilesandmeasurementmasks/limitscanbeusedtoconfirmthattheDUTmeetstheserequirements.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
4. Traffic Shaping and Prioritization Overview
AudioVideoBridgingoverEthernet(AVB)isasetofIEEEstandardsfortransportingaudioandotherreal-timecontentoverEthernet.ThegoalofAVBistodelaytrafficofthehighestAVBpriority(SRclassA)nomorethan2msover7hopsandofthesecondhighestAVBpriority(SRclassB)nomorethan50msover7hops.Morehopsresultincorrespondinglongerdelays.Toachievethesegoals,theCredit-BasedShaper(CBS)wasstandardizedinIEEEStd.802.1Qav-2010“ForwardingandQueuingofTime Sensitive Streams”.
Theory of Operation
Fromahigh-levelperspective,AVBworksbyreservingafractionoftheavailableEthernetbandwidthforAVBtraffic.AVBpacketsaresentregularlyintheallocatedslots.Asthebandwidthisreserved,therewillbenocollisions.
Allnodesinthesystemshareavirtualclock.AVBpacketshaveapresentationtimethatdefineswhenthemediapacketshouldbeplayed out.
AVB makes use of the following protocols:• IEEE802.1AS:TimingandSynchronizationforTime-SensitiveApplications(gPTP)• IEEE802.1Qat:StreamReservationProtocol(SRP)• IEEE802.1Qav:ForwardingandQueuingforTime-SensitiveStreams(FQTSS)
IEEE 802.1AS: gPTP
Allaudio/videodatatrafficinAVBissynchronizedtoaglobalclocksoaudio/videoproducersandconsumerscanplayandrecordsynchronously.
IEEEstandard802.1AS,gPTPistheprotocolwhichprovidesasynchronizedclock.gPTPnodesthatareconnectedusinganEthernetcablesendregularmessagestoeachother,reportingthetimeandcalculatingtheskewbetweentheirrespectiveclocks.Thenodewiththemostaccurateclockispickedasa“master”node.Allothernodesestimatetheirskewrelativetothemasterclock,enablingthemtocomputealocalclockthatiscloselykeptinsyncwiththemasterclock.
IEEE 802.1Qat: Stream Reservation Protocol (SRP)
TheAVBclassifiestrafficonthenetworkintotwogroups;real-timetrafficandthebesteffort.
Toensurethereissufficientroomavailableforallreal-timetraffic,aprotocolisusedtoallocatebandwidth.TheprotocolforallocatingbandwidthiscalledtheStreamReservationProtocol(SRP,IEEE802.1Qat).Itformsanotherfundamentalbuildingblockof the AVB standard.
AVBprovidesabandwidthreservationmethodtoestablishbandwidthguaranteesthroughoutamulti-hopEthernetnetworkfromthesourceofdatatoallpossiblerecipients.Thisbandwidthguaranteeeliminatespacketdropduetonetworkcongestion.Thisalsodistributesinformationaboutstreamavailabilityandnetworkconfigurationparametersrequiredforendpointstosendorreceive streams.
IEEE 802.1Qav: Forwarding and Queuing for Time-Sensitive Streams (FQTSS)
The CBS spaces out the high priority AVB stream frames as far as possible. For this the shaper uses the information about the reservedamountofbandwidthforAVBstreams,whichiscalculatedbySRP.Thespaced-outtrafficpreventstheformationoflongburstsofhighprioritytraffic.
Anothertaskoftheshaperistoenforcethebandwidthreservation.Hencetheshapingisperformedonaperstreamperclassbasisinthetalkerandonaperclassperportbasisinthebridges.ThisenforcesontheonehandthateveryAVBstreamislimitedtoitsreservedbandwidthinthetalker,andontheotherhandthattheoverallAVBstreambandwidthofeachport(intalkerandbridges)islimitedtothereservedone.
AVBgivesprioritytothetime-sensitivenetworkdatabyplacingrequirementsontheforwardingandqueuingbehaviorforthosestreams.Thisguaranteesdeliveryofdatafromanysource(aTalker)toanyreceiver(aListener)withaboundedmaximumlatency.
49
4.1. Credit-Based Shaping and Bandwidth Reservation Testing4.1.1. Test Case: Credit Shaping and Bandwidth Reservation Capabilities
Overview
Inthisscenario,threeSpirentTestCenterportsarerequiredtoverifythefunctionsofAVB.OnetestportemulatesaTalkerport,whichgeneratesadvertisementandtalkerstreams,secondtestportemulatesaListenerport,whichacceptsthestreamsgeneratedbythetalkerandthethirdtestportemulatesaNon-AVBportwhichjustgeneratesNon-AVBorBestefforttraffic.
Objective
TheobjectiveofthetestistoperformverificationofCreditshapingandBandwidthreservationcapabilitiesoftheDUT,theDUThereisaBridge.EachofthethreeSpirentTestCenterportsareconnectedtotheDUT(bridge).WhereOneofthethreeportsactasTalker,secondonealistenerandthethirdoneasaNon-AVBport.
TalkerportisresponsibleforgeneratingandadvertisingAVBstream,whilethelistenerportwillacceptorrejectastreamdependingontheruleconfigured.Non-AVBportgeneratesBestefforttraffic.
Topology
Step-by-Step Instructions
Application Launch & Adding Ports:a. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.
b. Add three Spirent TestCenter ports and connect each of these ports to the AVB switch.
c. Launch AVB from the wizard.
Steps to Launch AVB Protocol Through Wizard:a. Connect to three Spirent TestCenter ports which are in turn connected to the AVB switch.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
b. Launch AVB from wizard:
51
c. Select the port roles:
d. ConfigureSRP:
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Talker Configuration:
• Talker Port – displaysportthathasbeenselectedasTalkerport• Frame Size – canbeconfiguredtothesizeofAVTPframe• Link Speed – canbeconfiguredtosetthespeedofthelinkbetweenSpirentTestCenterTalkerportandthebridge• BW Reservation – canbeconfiguredtosetthepercentageofb/wtobereservedforAVB• SR Class VID – is the VLAN ID• Calculate Maximum Streams – thisbuttongivestheMaximumnoofsuccessfulTalkeradvertisementspossibleforthisconfiguration
• Number of Streams – canbeusedtoconfigurethenumberofstreamsuserwantstoconfigureontheTalker• Create AVTP Streams – checkboxcanbeusediftheuserlikestocreateAVTPstreamscorrespondingtotheTalker
Advertisements
Listener Configuration
• Listener Port – displays port that has been selected as Listener port• Listener Action – Acceptsallstreams(notconfigurable)
e. ConfigureGPTP:
Below are the gPTP fields that can be configured using wizard:• Priotity1• Priority2• ClockAccuracy• Log Announce Interval• Log Sync Interval• Announce Receipt Timeout• Propagation Delay
53
f. ConfigureNon-AVBstreams:
Below are the fields configurable for best effort traffic:• Frame Size – sizeofthebestefforttrafficframes• Load Rate (fps) – Rate in fps• Number of Streams – numberofbestefforttrafficstreams
g. AVBSummarypage,thispagedisplaysthesummaryofconfigurationmade:
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
h. ClickFinish.ObservedthattheSRP,gPTPanddatastreamconfigurationsdoneusingwizardareavailableasshownbelow:
SRP
gPTP
AVTP Streams
Best Effort Traffic
i. EnsurethatthecorrespondingportsonDUTareconfiguredforSRP,IEEE802.1AS.ConfiguretheQavBandwidthsameasthevaluesetinWizardwhileconfiguringSRP.
j. Apply and start all devices.
55
Verify Results:
a. VerifyfromSRPresultsthattheProtocolstateisUp,alsoverifytheothercounters:
b. Verify from IEEE802.1AS results that the Spirent TestCenter ports have successfully completed BMCA:
c. GotoTrafficgeneratoronNon-AVBportandstarttheBestefforttraffic. VerifyfromtheStreamBlockResultsthatallBesttrafficgoesthroughwithoutanydrops,sincethereisnoAVBtrafficyet.VerifytheDroppedFramePercentfieldforthesame.
Inthisexampleconfiguration,linkspeedis1Gbpsor125MBps.
Sincewehaveconfigured18Non-AVB(Besteffort)streams,Framesize800bytesandfps8000,thestreamsutilizebandwidthasfollows:
B/WutilizedbyBestefforttraffic=18*800*8000=115.2MBps,whichis92%ofavailablebandwidth.
d. GototheTrafficgeneratorofTalkerportandstartAVBtraffic. VerifyfromStreamresultsthatalltheAVTPstreamsreachtheListenerwithoutanyFramedropwhereastheBestefforttrafficframes are dropped. Verify the again Dropped Frame Percentfieldforthesame.
e. AddfewmorestreamsontheTalkerportmanuallysuchthatthenumberofstreamsconfiguredisgreaterthatMaximumStreams.ApplyandverifyformtheStreamInfocommandonListenerthattheDUTconvertsTalkeradvertisementsforexcessstreams into failures.
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
4.2. Pre-emption TestingOverview
Time-SensitiveNetworking(TSN)isasetofIEEEstandardsthatareaddressingthetimingcriticalaspectofsignalflowinapacket
switchedEthernetnetworktoensuredeterministicoperation.Thesestandardsareaddingtotheworkinitiallydevelopedfrom
AudioVideoBridging(AVB)groups.
Thisdocumentwilldiscusshowpre-emptionworksandhowtosetupSpirentTestCentertotestthisdevelopingstandard.There
are two standard bodies that are affected by this: IEEE 802.3 and IEEE 802.1. Pre-emption is detailed under IEEE 802.1Qbu
FramePre-emptionforBridgeManagementandIEEE802.3brforEthernetMediaAccessControl(MAC)componentstoreactand
control the contents of the preamble.
Theory of Operation
Fromahigh-levelperspective,TSNpre-emptionhasadiscoveryphasewhereeachmemberofthenetworkisabletoannounce
itspre-emptioncapabilityandinquireaboutthecapabilitiesofitsdirectlyconnectedneighborusingLinkLayerDiscovery
Protocol(LLDP).Pre-emptionisapointtopointtechnology(directlyconnected).Framepre-emptionincreasetheefficiencyofthe
networkbycreatingareductionintheguardbandrequirementsforEthernetpackets.Pre-emptionwillallowbesteffort(non-
time-sensitive)dataframestobeinterruptedbytimesensitiveframes.
DevicesthatcomplywiththesestandardswillneedtoreadandreacttothepreamblefieldoftheEthernetframepriortothestart
framedelimiter(SFD).Typically,commercialdevicesonthemarkettodaydonothaveaccesstosuchalow-levelcontrolandwill
need to develop new functions that will address these standards.
ThisdocumentwilldescribehowtosetupstreamsusingSpirentC50hardwarewithmodifiedpreambledatatocreateexpress
andpre-emptabletrafficprofilesthatwillbeusedtoforcepre-emptionattheswitchegressport.Thistrafficisthenreconstructed
byanotherswitchthatreceivesitandsendsittoareceivingSpirentportforanalysisandvalidationofpacketsequenceordering,
packetre-assembly,frameloss,latencyandjittermeasurements,aswellasanyframeerrorscausedbyreconstructionofthepre-
emptedtraffic.
TSN makes use of the following protocols:
• IEEE 802.1Qbu: Frame Pre-emption
• IEEE802.3BR:AmendmentforMACtoaddsupportforinterspersingexpresstraffic
IEEE 802.1Qbu: Frame Pre-emption
Usedtosuspendthetransmissionofapre-emptableframetoallowoneormoreexpresstrafficframestobetransmittedbefore
transmissionofthepre-emptableframeisresumed.Duringtransmissionoftheinitialframe,thedevicewillneedtopause
transmissionofapre-emptableframetoallowanexpressframetooccupythewire,thentheremainingsectionsoftheinitial
frame will occupy the wire.
IEEE 802.3Br: MAC Support for Interspersing Express Traffic
ThisspecificationdefineswhatisrequiredattheMAClayerofadevicetosupportpre-emptableandexpresstraffictypestoa
single physical signaling sublayer service.
57
4.2.1. TestCase:GenerationofModifiedPreamblePacketStream
Overview
Inthisscenario,fourSpirentTestCenterportsareusedtogeneratetwopacketstreamsofdata,receive,analyzeandmonitorthe
traffic.Thefirststreamwillbeexpresstrafficwithstandardpreamblemodifiers.Thesecondstreamwillcontainausereditable
modifiedpreambleheaderpacketstream.Thesetupcanalsobeusedtovalidateifadeviceentersthecorrectstateswhen
receivingapacketwithamodifiedpreambleonitingressports.
Objective
The objective of the test is to help validate and measure pre-emption performance between two switch egress ports.
Observationscanbemadetobetterunderstandlatency,jitter,throughputandframelossbetweeneachswitchandtoevaluate
whatisthebestpacketsizeandpacketschedulesthatyieldtheoptimalperformanceunderfullnetworkload.Thetestsetupcan
alsobeusedtovalidateifaDUT/endpointcancorrectlyreceiveandtranslatesthepreambledataofapacketstream.Thisisthe
firststeptoenablingpre-emptioninanapplicationandvalidateeachstateisrecognizedproperlywithinanapplication.
Pre-emption—Preamble Breakout Diagram
TheSMDinthediagrambelowindicateswhetherthemPacketcontainsanexpresspacket,thestartofapre-emptablepacket
(initialfragmentorcompleteplacket),oranyofthecontinuationfragmentsofapre-emptablepacket.
TheSMDalsoindicatestheframecountinformation.Theframecountinformationhelpspreventreassemblinganinvalidpacket
ifthefinalmPacketofonepre-emptablepacketandtheinitialfragmentofthenextpre-emptablepacketarelostordropped.The
frame count is a modulo-4 count.
Onaframecontainingcontinuationfragmentsbyte7representstheSMDandbyte8representsthefragmentedpacketcount.
ThiscountprotectsagainstmPacketreassemblyerrorsbyenablingdetectionofthelossofupto3packetfragments.The
fragmentcountisonlypresentinmPacketswithSMD-Csetinbyte7.Thefragmentcountiszerointhefirstcontinuationfragment
ofeachpre-emptablepacket.
0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xD5
1 2 3 4 5 6 7 8
0x55 0x55 0x55 0x55 0x55 0x55 0x55 SMD
0x07 0x19 0xD5 0xE6 0x4C 0x7F 0xB3 0x61 0x52 0x9E 0x2A
0xE6(0)
0x4C(1)
0x7F(2)
0xB3(3)
0x55 0x55 0x55 0x55 0x55 0x55 SMD frag_count
1 2 3 4 5 6 7 8
SFD = Start Frame Delimiter
= Start mPacket Delimiter
= Fragment Count (modulo-4 counter)
verifypacket
respondpacket
expresspacket
preemptable packet startSMD-S0..3
continuation fragmentSMD-C0..3
Normal Ethernet Frame
Frame containing an
Frame containing a continuation fragment
■ express packet, ■ a complete pre-emptable packet or ■ an initial fragment of a packet
Preamble manipulation
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
Pre-emption Packet Scheduling Example
Thisfigurebelowidentifiedhowatypicalpre-emptionpacketschedulingworksbetweenswitchegressports:
CRC Calculation Across Pre-emption Packet and Fragment Packet
ToavoidanapplicationdroppingpacketswithincorrectFrameCheckSequence(FCS)issues,thewaytheCRCcalculationsare
performedwillneedtochangeforapplicationworkingwithpre-emption.BelowisadiagramshowinghowthenewmCRCand
FCSchecksumworksforexpressandpre-emptabletrafficpackets.
mData
Dest AddrSrc Addr
Eth TypeSMD mCRC
Dest MAC Addr6B
Source MAC Addr6B
Payload (46-1500 Bytes)EtherType
FCS
PreamblePayload Frag A
to fill minimum60 Bytes mData size
8 Bytes
Fragment AFirst Fragment
Original Ethernet Framethat will be preempted 2 times,
into 3 fragments
60 - 1518 Bytes
4 Bytes
mData
FC mCRCPreamble
Payload Frag B
to fill minimum60 Bytes mData size
8 Bytes
Fragment B
Frag A mData + Frag B mData32b CRC, Final XOR Value = 0x0000FFFF
Frag A mData + Frag B mData + Frag C mData32b CRC, Final XOR Value = 0xFFFFFFFF
Frag A mData32b CRC, Final XOR Value = 0x0000FFFF
Frag A mData Frag B mData Frag C mData
32b CRC, Final XOR Value = 0xFFFFFFFF
60 - 1518 Bytes
4 Bytes 8 Bytes 4 Bytes
mData
FCS
Fragment CLast Fragment
60 - 1518 Bytes
SMD FCPreamble SMD
Payload Frag C
Last fragment,contains
remaining data>= 60 Bytes
59
4.2.2. Test Case: Creating Traffic Profiles to Cause Pre-emption Between Switch Egress Ports
The diagram below shows how you can set up Spirent TestCenter to measure the performance of your implementation under
variouspacketandloadconditions:
Step-by-Step Instructions
Application Launch & Generation of Streamsa. LaunchSpirentTestCenterfromtheDesktopshortcutorfromthestartprogrammenu.
b. Build upon the examples of gPTP and SRP as it pertains to stream generation wizards.
c. CreateexpresstrafficusingSpirentTrafficGenerator.
d. Createpre-emptabletrafficusingSpirentTrafficGenerator.
e. Reviewtrafficstreamresultsunderresultsview.
Create Express and Pre-emptable Traffic Using Spirent Traffic Generator
a. YoucanbuildontoyourexistinggPTPorSRPWizardimplementationorstartwithanewportbyfollowingthedirections
below.
b. ExpandtheAllPortsentryintheoutline,clickPortandunderportclickTrafficGenerator:
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
c. Clickthedropdown“Add”select“AddRawStreamBlock…”
d. ConfiguretheGeneralSettings:FrameSize
61
e. ClickontheFrametab,selectthetypeofframeyouwanttouse:
f. Toshowthepreambledatayouwillneedtoselect“ShowAllFields”asshownbelow:
www.spirent.com
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
g. Thedefaultpreamble55555555555555d5willworkforexpresstrafficstreams.
h. Switchtotheportyouwanttocreatepre-emptabletrafficonandmodifytheframesize:
i. ClickontheFrametab–select“ShowAllFields”option:
63
j. Modify the preamble data with the values from the Scheduling Example:
k. HitOKontheCustomEditorwindow,hitOKontheStreamBlockEditor.
l. Hit Apply to push the changes down to the hardware appliance:
m. ClicktheStartTrafficGeneratorbuttontostartbothstreams:
n. Reviewyourbasicanddetailedstreamresultstofindlatency,jitterandthroughputvalues:
About Spirent Communications
Spirent Communications (LSE: SPT) is a global leader with deep expertise and decades of experience in testing, assurance, analytics and security, serving developers, service providers, and enterprise networks.
We help bring clarity to increasingly complex technological and business challenges.
Spirent’s customers have made a promise to their customers to deliver superior performance. Spirent assures that those promises are fulfilled.
For more information, visit: www.spirent.com
Contact Us
For more information, call your Spirent sales representative or visit us on the web at www.spirent.com/ContactSpirent.
www.spirent.com
© 2019 Spirent Communications, Inc. All of the company names and/or brand names and/or product names and/or logos referred to in this document, in particular the name “Spirent” and its logo device, are either registered trademarks or trademarks pending registration in accordance with relevant national laws. All rights reserved. Specifications subject to change without notice.
Americas 1-800-SPIRENT +1-800-774-7368 | [email protected]
Europe and the Middle East +44 (0) 1293 767979 | [email protected]
Asia and the Pacific +86-10-8518-2539 | [email protected]
Rev E | 06/19
Time-Sensitive Networking (TSN) PlaybookTest Cases & Methodologies
5. AcronymsAVB Audio Video Bridging
AVTP Audio Video Transport Protocol
BMCA BestMasterClockAlgorithm
CBS Credit-Based Shaper
CRC CyclicRedundancyCheck
DUT Device Under Test
FCS FrameCheckSequence
FQTSS Forwarding and Queuing Enhancements for Time-Sensitive Streams
gPTP Generalized Precision Time Protocol
IEEE802.1AS Standard for Generalized Precision Time Protocol
IEEE802.1Qat Standard for Stream Reservation Protocol
IEEE802.1Qav Standard for Forwarding and Queuing of Time-Sensitive Streams
IEEE802.1Qbu Standard for Frame Pre-emption Protocol
IEEE802.3br AmendmentforMACtoAddSupportforInterspersingExpressTraffic
Listener AVB endpoint consuming the media streams
LLDP LinkLayerDiscoveryProtocol
MAC Media Access Control
PTP Precision Time Protocol
SFD Start Frame Delimiter
SMD StartmPacketDelimiter
SR Stream Reservation
SRP Stream Reservation Protocol
SR Class Stream Reservation Class
TAI International Atomic Time
Talker AVB endpoint producing media streams
TSN Time-SensitiveNetworking