TC(8) Linux TC(8) NAME drr−deficitroundrobinscheduler SYNOPSIS tcqdisc...adddrr[quantumbytes] DESCRIPTION TheDeficitRoundRobinSchedulerisaclassfulqueuingdisciplineasamoreflexiblereplacement forStochasticFairnessQueuing. UnlikeSFQ,therearenobuilt-inqueues−−youneedtoaddclassesandthensetupfiltersto classifypacketsaccordingly.Thiscanbeusefule.g.forusingREDqdiscswithdifferentsettings forparticulartraffic.Thereisnodefaultclass−−ifapacketcannotbeclassified,itisdropped. ALGORITHM Eachclassisassignedadeficitcounter,initializedtoquantum. DRRmaintainsan(internal)’’active’’listofclasseswhoseqdiscsarenon-empty.Thislistisused fordequeuing.Apacketisdequeuedfromtheclassattheheadofthelistifthepacketsizeis smallerorequaltothedeficitcounter.Ifthecounteristoosmall,itisincreasedbyquantum andtheschedulermovesontothenextclassintheactivelist. PARAMETERS quantum Amountofbytesaflowisallowedtodequeuebeforetheschedulermovestothenext class.DefaultstotheMTUoftheinterface.Theminimumvalueis1. EXAMPLE&USAGE Toattachtodeviceeth0,usingtheinterfaceMTUasitsquantum: #tcqdiscadddeveth0handle1rootdrr Addingtwoclasses: #tcclassadddeveth0parent1:classid1:1drr #tcclassadddeveth0parent1:classid1:2drr Youalsoneedtoaddatleastonefiltertoclassifypackets. #tcfilteradddeveth0protocol..classid1:1 LikeSFQ,DRRisonlyusefulwhenitownsthequeue−−itisapurescheduleranddoesnot delaypackets.Attachingnon-work-conservingqdiscsliketbftoitdoesnotmakesense−−other qdiscsintheactivelistwillalsobecomeinactiveuntilthedequeueoperationsucceeds.Embed DRRwithinanotherqdisclikeHTBorHFSCtoensureitownsthequeue. YoucanmimicSFQbehaviorbyassigningpacketstotheattachedclassesusingtheflowfilter: tcqdiscadddev..drr foriin..1024;do tcclassadddev..classid$handle:$(print%x$i) tcqdiscadddev..fifolimit16 done tcfilteradd..protocolip..$handleflowhashkeyssrc,dst,proto,proto-src,proto-dst divisor1024perturb10 iproute2 January2010 1 TC(8) Linux TC(8) SOURCE o M.ShreedharandGeorgeVarghese"EfficientFairQueuingusingDeficitRoundRobin", Proc.SIGCOMM95. NOTES Thisimplementationdoesnotdroppacketsfromthelongestqueueonoverrun,aslimitsarehandledbytheindividualchildqdiscs. SEEALSO tc(8),tc-htb(8),tc-sfq(8) AUTHOR scheddrrwaswrittenbyPatrickMcHardy. iproute2 January2010 2