关闭

关闭

封号提示

内容

首页 intel-dpdk-getting-started-guide.pdf

intel-dpdk-getting-started-guide.pdf

intel-dpdk-getting-started-guid…

上传者: 一鸣不惊人的世界 2013-05-21 评分 0 0 0 0 0 0 暂无简介 简介 举报

简介:本文档为《intel-dpdk-getting-started-guidepdf》,可适用于IT/计算机领域,主题内容包含ReferenceNumber:IntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuide符等。

ReferenceNumber:IntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberIntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberReferenceNumber:LegalLinesandDisclaimersINFORMATIONINTHISDOCUMENTISPROVIDEDINCONNECTIONWITHINTELPRODUCTSNOLICENSE,EXPRESSORIMPLIED,BYESTOPPELOROTHERWISE,TOANYINTELLECTUALPROPERTYRIGHTSISGRANTEDBYTHISDOCUMENTEXCEPTASPROVIDEDININTEL'STERMSANDCONDITIONSOFSALEFORSUCHPRODUCTS,INTELASSUMESNOLIABILITYWHATSOEVERANDINTELDISCLAIMSANYEXPRESSORIMPLIEDWARRANTY,RELATINGTOSALEANDORUSEOFINTELPRODUCTSINCLUDINGLIABILITYORWARRANTIESRELATINGTOFITNESSFORAPARTICULARPURPOSE,MERCHANTABILITY,ORINFRINGEMENTOFANYPATENT,COPYRIGHTOROTHERINTELLECTUALPROPERTYRIGHTA“MissionCriticalApplication”isanyapplicationinwhichfailureoftheIntelProductcouldresult,directlyorindirectly,inpersonalinjuryordeathSHOULDYOUPURCHASEORUSEINTEL'SPRODUCTSFORANYSUCHMISSIONCRITICALAPPLICATION,YOUSHALLINDEMNIFYANDHOLDINTELANDITSSUBSIDIARIES,SUBCONTRACTORSANDAFFILIATES,ANDTHEDIRECTORS,OFFICERS,ANDEMPLOYEESOFEACH,HARMLESSAGAINSTALLCLAIMSCOSTS,DAMAGES,ANDEXPENSESANDREASONABLEATTORNEYS'FEESARISINGOUTOF,DIRECTLYORINDIRECTLY,ANYCLAIMOFPRODUCTLIABILITY,PERSONALINJURY,ORDEATHARISINGINANYWAYOUTOFSUCHMISSIONCRITICALAPPLICATION,WHETHERORNOTINTELORITSSUBCONTRACTORWASNEGLIGENTINTHEDESIGN,MANUFACTURE,ORWARNINGOFTHEINTELPRODUCTORANYOFITSPARTSIntelmaymakechangestospecificationsandproductdescriptionsatanytime,withoutnoticeDesignersmustnotrelyontheabsenceorcharacteristicsofanyfeaturesorinstructionsmarked“reserved”or“undefined”IntelreservestheseforfuturedefinitionandshallhavenoresponsibilitywhatsoeverforconflictsorincompatibilitiesarisingfromfuturechangestothemTheinformationhereissubjecttochangewithoutnoticeDonotfinalizeadesignwiththisinformationTheproductsdescribedinthisdocumentmaycontaindesigndefectsorerrorsknownaserratawhichmaycausetheproducttodeviatefrompublishedspecificationsCurrentcharacterizederrataareavailableonrequestContactyourlocalIntelsalesofficeoryourdistributortoobtainthelatestspecificationsandbeforeplacingyourproductorderCopiesofdocumentswhichhaveanordernumberandarereferencedinthisdocument,orotherIntelliterature,maybeobtainedbycalling,orgoto:http:wwwintelcomdesignliteraturehtmAnysoftwaresourcecodereprintedinthisdocumentisfurnishedforinformationalpurposesonlyandmayonlybeusedorcopiedandnolicense,expressorimplied,byestoppelorotherwise,toanyofthereprintedsourcecodeisgrantedbythisdocumentIntelandtheIntellogoaretrademarksofIntelCorporationintheUSandorothercountries*OthernamesandbrandsmaybeclaimedasthepropertyofothersCopyright,IntelCorporationAllrightsreservedIntelDataPlaneDevelopmentKit(IntelDPDK)NovemberGettingStartedGuideReferenceNumber:RevisionHistoryIntelDPDKRevisionHistoryContentsIntroductionDocumentationRoadmapSystemRequirementsBIOSSettingPrerequisiteCompilationoftheIntelDPDKRunningIntelDPDKApplicationsinaLinuxEnvironmentUserspaceIOinaLinuxEnvironmentUseofHugepagesintheLinuxEnvironmentReservingHugepagesforIntelDPDKUseUsingHugepageswiththeIntelDPDKCompilingtheIntelDPDKTargetfromSourceInstalltheIntelDPDKandBrowseSourcesInstallationofIntelDPDKTargetEnvironmentsBrowsingtheInstalledIntelDPDKEnvironmentTargetLoadingtheIntelDPDKigbuioModuleCompilingandRunningSampleApplicationsCompilingaSampleApplicationRunningaSampleApplicationAdditionalSampleApplicationsQuickStartSetupScriptScriptOrganizationUseCasesApplicationsDateRevisionDescriptionNovemberSupportspublicsoftwarereleaseIntelDPDKIntroductionIntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberReferenceNumber:IntroductionThisdocumentcontainsinstructionsforinstallingandconfiguringtheIntelDataPlaneDevelopmentKit(IntelDPDK)softwareItisdesignedtogetcustomersupandrunningquicklyThedocumentdescribeshowtocompileandrunanIntelDPDKapplicationinaLinux*application(linuxapp)environment,withoutgoingdeeplyintothedetailDocumentationRoadmapThefollowingisalistofIntelDPDKdocumentsinthesuggestedreadingorder:•ReleaseNotes:Providesreleasespecificinformation,includingsupportedfeatures,limitations,fixedissues,knownissuesandsoonAlso,providestheanswerstofrequentlyaskedquestionsinFAQformat•GettingStartedGuide(thisdocument):DescribeshowtoinstallandconfiguretheIntelDPDKdesignedtogetusersupandrunningquicklywiththesoftware•Programmer'sGuide:Describes:Thesoftwarearchitectureandhowtouseit(throughexamples),specificallyinaLinux*application(linuxapp)environmentThecontentoftheIntelDPDK,thebuildsystem(includingthecommandsthatcanbeusedintherootIntelDPDKMakefiletobuildthedevelopmentkitandanapplication)andguidelinesforportinganapplicationOptimizationsusedinthesoftwareandthosethatshouldbeconsideredfornewdevelopmentAglossaryoftermsisalsoprovided•APIReference:ProvidesdetailedinformationaboutIntelDPDKfunctions,datastructuresandotherprogrammingconstructs•SampleApplicationsUserGuide:DescribesasetofsampleapplicationsEachchapterdescribesasampleapplicationthatshowcasesspecificfunctionalityandprovidesinstructionsonhowtocompile,runandusethesampleapplicationIntelDataPlaneDevelopmentKit(IntelDPDK)NovemberGettingStartedGuideReferenceNumber:SystemRequirementsIntelDPDKSystemRequirementsThischapterdescribesthepackagesrequiredtocompiletheIntelDPDKBIOSSettingPrerequisiteTheHighPrecisionTimer(HPET)mustbeenabledintheplatformBIOSTheBIOSistypicallyaccessedbypressingFwhiletheplatformisstartingupTheusercanthennavigatetotheHPEToptionOntheCrystalForestplatformBIOS,thepathis:Advanced>PCHIOConfiguration>HighPrecisionTimer>(ChangefromDisabledtoEnabledifnecessary)Onasystemthathasalreadybooted,thefollowingcommandcanbeissuedtocheckifHPETisenabled:#grephpetproctimerlistIfnoentriesarereturned,HPETmustbeenabledintheBIOS(aspertheinstructionsabove)andthesystemrebootedNote:IfHPETinitializationfails,orisnotused,theHPETbasedAPIsprovidedbytheIntelDPDKtransparentlyfallsbacktouseoftheCPUtimestampcount,thatis,rdtsc,toprovidethetimesourceinsteadCompilationoftheIntelDPDKRequiredTools:Note:TestinghasbeenperformedusingFedoraThesetupcommandsandinstalledpackagesneededonothersystemsmaybedifferent•GNUmake•coreutils:cmp,sed,grep,arch•nasmversionslaterthan•gcc:versionsxorlaterisrecommendedOnsomedistributions,somespecificcompilerflagsandlinkerflagsareenabledbydefaultandaffectperformance(fstackprotector,forexample)Pleaserefertothedocumentationofyourdistributionandtogccdumpspecs•libcheaders(glibcdevelilibcdeviglibcdevelxforbitcompilation)•Additionalpackagesrequiredforbitcompilationonbitsystemsare:glibci,libgcci,libstdciandglibcdeveliOptionalTools:•IntelCCompiler(icc)Forinstallation,additionallibrariesmayberequiredSeetheiccInstallationGuidefoundintheDocumentationdirectoryunderthecompilerinstallationVersionisknowntoworkIntelDPDKSystemRequirementsIntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberReferenceNumber:RunningIntelDPDKApplicationsinaLinuxEnvironmentTorunanIntelDPDKapplication,somecustomizationmustbedoneonthetargetmachineRunninganIntelDPDKapplicationrequiressomekernelconfigurationcustomization(doneatbuildtime)andsomedynamickerneltweaks(modules,procfs):Required:•glibc>=(forfeaturesrelatedtocpuset)TheversioncanbecheckedusingthelddversioncommandAsampleoutputisshownbelow:#lddversionldd(GNUlibc)Copyright(C)FreeSoftwareFoundation,IncThisisfreesoftwareseethesourceforcopyingconditionsThereisNOwarrantynotevenforMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSEWrittenbyRolandMcGrathandUlrichDrepper•KernelconfigurationOnFedoraandothercommondistributions,suchasUbuntu*,theHPEToptionsbelowarenotenabledbydefaultConsequently,itisnecessarytorecompilethekernelSeehttp:fedoraprojectorgwikiBuildingacustomkernelforinstructionsonrecompilingthekernelonFedoraForotherLinux*distributions,pleaseconsultthatdistribution'sdocumentationforrelevantinstructionsNote:IftheIntelDPDKisbeingusedonaCrystalForestplatform,pleaseconsulttheCrystalForestSoftwareforLinux*GettingStartedGuidefordetailsonthekernelpatchingthatshouldbeperformedbeforerecompilingthekernelTheoptionsthatmustbeconfiguredare:HPET(enabledbydefault)andHPETMMAP(notenabledbydefault)configurationoptionsenabledUIOkerneloptionsenabledthedefaultFedorasettingsaresufficientHUGETLBFSenabledPROCPAGEMONITORenabledTodeterminethefunctionalityenabledinthekernel,thefollowingcommandisuseful:#grepHPETbootconfig`unamer`CONFIGHPETTIMER=yCONFIGHPETEMULATERTC=yCONFIGHPET=yCONFIGHPETMMAP=yUserspaceIOinaLinuxEnvironmentTheIntelDPDKigbuiokernelmoduledependsonkerneluiosupporttooperateThisuiosupportmaybecompiledasamodule,sothismoduleshouldbeloadedusingthemodprobeprogram:sudosbinmodprobeuio#neededifuioisbuiltasamoduleIntelDataPlaneDevelopmentKit(IntelDPDK)NovemberGettingStartedGuideReferenceNumber:SystemRequirementsIntelDPDKNote:Bydefault,modprobeattemptstoloadthemodulefromthelibmodules<kernelversion>kerneldriversdirectoryUseofHugepagesintheLinuxEnvironmentKernelsmayrequirepatchestosupporthugepageallocations(theHUGETLBFSoptionmustbeenabledasindicatedinSection)HugepagesupportisrequiredforthelargememorypoolallocationusedforpacketbuffersByusinghugepageallocations,performanceisincreasedsincefewerpagesareneeded,andthereforelessTranslationLookasideBuffers(TLBs,highspeedtranslationcaches),whichreducethetimeittakestotranslateavirtualpageaddresstoaphysicalpageaddressWithouthugepages,highTLBmissrateswouldoccur,slowingperformanceThefollowingkernelsmayrequirepatchestoprovidehugepagesupport:Note:Bluetextinthelistbelowaredirectlinkstothepatchdownloads•kernel>=(basekernel,withnopatchesapplied)OR•kernel>=,withthefollowingpatchesapplied:addhugepagesupporttopagemapfixhugepagememoryleakaddnodemaskargtohugepagealloc(notmandatory,butrecommendedonaNUMAsystemtosupportperNUMAnodehugepagesallocation)OR•kernel>=,withthefollowingpatchesapplied:fixhugepagememoryleakaddhugepagesupporttopagemapadduionameattributesandportregionsaddnodemaskargtohugepagealloc(notmandatory,butrecommendedonaNUMAsystemtosupportperNUMAnodehugepagesallocation)ReservingHugepagesforIntelDPDKUseTheallocationofhugepagesshouldbedoneatboottimeorassoonaspossibleaftersystemboottopreventmemoryfrombeingfragmentedinphysicalmemoryToreservehugepagesatboottime,aparameterispassedtotheLinuxkernelonthekernelcommandlineForMBpages,justpassthehugepagesoptiontothekernelForexample,toreservepagesofMB,use:hugepages=Forotherhugepagesizes,forexampleGpages,thesizemustbespecifiedexplicitlyandalsosetasthedefaulthugepagesizeforthesystemForexample,toreserveGofhugepagememoryintheformoffourGpages,thefollowingoptionsshouldbepassedtothekernel:defaulthugepagesz=Ghugepagesz=Ghugepages=IntelDPDKSystemRequirementsIntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberReferenceNumber:Note:ThehugepagesizesthataCPUsupportscanbedeterminedfromtheCPUflagsIf“pse”exists,Mhugepagesaresupportedif“pdpegb”exists,GhugepagesaresupportedNote:Forbitapplications,itisrecommendingtouseGBhugepagesiftheplatformsupportsthemInthecaseofadualsocketNUMAsystem,thenumberofhugepagesreservedatboottimeisgenerallydividedequallybetweenthetwosockets(ontheassumptionthatsufficientmemoryispresentonbothsockets)SeetheDocumentationkernelparameterstxtfileinyourLinuxsourcetreeforfurtherdetailsoftheseandotherkerneloptionsAlternative:ForMBpages,thereisalsotheoptionofallocatinghugepagesafterthesystemhasbootedThisisdonebyechoingthenumberofhugepagesrequiredtoanrhugepagesfileinthesysdevicesdirectoryForasinglenodesystem,thecommandtouseisasfollows(assumingthatpagesarerequired):echo>syskernelmmhugepageshugepageskBnrhugepagesOnaNUMAmachine,pagesshouldbeallocatedexplicitlyonseparatenodes:echo>sysdevicessystemnodenodehugepageshugepageskBnrhugepagesecho>sysdevicessystemnodenodehugepageshugepageskBnrhugepagesNote:ForGpages,itisnotpossibletoreservethehugepagememoryafterthesystemhasbootedUsingHugepageswiththeIntelDPDKOncethehugepagememoryisreserved,tomakethememoryavailableforIntelDPDKuse,performthefollowingsteps:mkdirmnthugemountthugetlbfsnodevmnthugeWhenrunninganapplication(seeChapter,“CompilingandRunningSampleApplications”),itisrecommendedtousethesameamountofmemoryasthatallocatedforhugepagesThisisdoneautomaticallybytheIntelDPDKapplicationatstartup,ifnomparameterispassedtoitwhenrunIfmorememoryisrequestedbyexplicitlypassingamvalue,theapplicationfailsHowever,theapplicationcanalsofailiftheuserrequestslessmemorythanthereservedamountofhugepagememoryThereasonisasfollowsSupposethesystemhasreservedpagesinsocketandinsocketIftheuserrequestsMBofmemory,thepagesmaynotmatchtheconstraints:•ItcanbeinsocketonlyInthiscase,iftheapplicationasksformemoryinsocket,itfails•Thesepagescanbelocatedanywhereinphysicalmemory,anditislikelythatthepageswillnotbecontiguousInthiscase,theapplicationisnotabletoallocatebigmemorypoolsEvenifhugepagesareallocatedveryearlyafterthebootprocess,itislikelythattheallocatedmemorywillnotbecontiguousIntelDataPlaneDevelopmentKit(IntelDPDK)NovemberGettingStartedGuideReferenceNumber:CompilingtheIntelDPDKTargetfromSourceIntelDPDKCompilingtheIntelDPDKTargetfromSourceInstalltheIntelDPDKandBrowseSourcesNote:Inthefollowingdescription,rtesourcerepresentsthenameandlocationofthesoftwaretobeinstalledFirst,uncompressthearchiveandmovetotherootdirectory:userdroid:~$unzipDPDKL<version>zipuserdroid:~$cdrtesourceuserdroid:~$lsappconfigCOPYRIGHTdocexampleslibMakefilemkscriptstoolsTheIntelDPDKiscomposedofseveraldirectories:•lib:SourcecodeofIntelDPDKlibraries•app:SourcecodeofIntelDPDKapplications(automatictests)•examples:SourcecodeofIntelDPDKapplicationexamples•config,tools,scripts,mk:Frameworkrelatedmakefiles,scriptsandconfiguration•doc:DocumentationInstallationofIntelDPDKTargetEnvironmentsTheformatofaIntelDPDKtargetis:ARCHMACHINEEXECENVTOOLCHAINwhere:•ARCHcanbe:i,x•MACHINEcanbe:default•EXECENVcanbe:linuxapp•TOOLCHAINcanbe:gcc,iccThetargetstobeinstalleddependonthebitandorbitpackagesandcompilersinstalledonthehostAvailabletargetscanbefoundinthertesourceconfigdirectoryThedefconfigprefixshouldnotbeusedNote:ConfigurationfilesareprovidedwithRTEMACHINEsettodefaultHowever,othervalidvaluesforRTEMACHINEincludenative,whichtunesthesoftwarefortheplatformitisbuilton,aswellasmicroarchitecturespecificvaluesSeetheIntelDPDKProgrammer'sGuideformoreinformationonpossiblevaluesIntelDPDKCompilingtheIntelDPDKTargetfromSourceIntelDataPlaneDevelopmentKit(IntelDPDK)GettingStartedGuideNovemberReferenceNumber:ThosetargetswithanEXECENVvalueoflinuxappruninLinux*userspaceThesetargetscreatetheIntelDPDKtargetenvironmentsonwhichcustomerapplicationscanbebuiltWhenusingtheIntelCCompiler(icc),oneofthefollowingcommandsshouldbeinvokedforbitorbituseNoticethattheshellscriptsupdatethe$PATHvariableandthereforeshouldnotbeperformedinthesamesessionAlso,verifythecompiler's

职业精品

精彩专题

上传我的资料

热门资料

资料评价:

/ 18
所需积分:0 立即下载

意见
反馈

返回
顶部

Q