From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Default Date: Wed, 09 May 2007 20:24:22 +0000 Subject: Re: [LARTC] Token Bucket Filter and Dropping Message-Id: <46422DF6.7000405@advaita.sytes.net> List-Id: References: <002a01c79166$3e53a7b0$bafaf710$@pl> In-Reply-To: <002a01c79166$3e53a7b0$bafaf710$@pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi No need for htb, simple tbf will do. But if you are creating your own: As i understand token bucket, you should take each packet from the end=20 of queue in order they are there, i.e S1, S2, S1, S2, not just each=20 other. When the bucket is full, you will drop every packet on input. It=20 is unlikely that you will free space in buffer everytime right when S2=20 packet comes... You would have buffer full of s2 then, not s1|s2|s1...=20 as you say. Are you sure you are dequeuing from front and doing tail-drop ? As i understand: dequeue at constant=20 rate<--que_front_s1,s2,s1,s2,s1,s2_que_tail<--enqueue input or drop Maybe change in size of token could help mix this... How big is one=20 token now? (i do not know how your tbf is implemented...)Can you give=20 more details ? By the way: how are you creating those streams, i think it is unusual to=20 see such properly ordered packets of streams in real life ... If i am completely out, sorry then, just beginner. Best regards (default) Piotr W=F3jcicki wrote: > I am trying to create my own Token Bucket Filter. However, I have a probl= em > with packet dropping. > > Scenario : > I got two streams 20KB/s each. > I got one bucket with rate 20KB/s > > I put both streams into this bucket. > > When buffer is full packets need to be dropped. The problem is that only > every other packet needs to be dropped in this scenario. > Streams are the same so queue looks like that : > > S1 | S2 | S1 | S2 > > Packets form both streams are one by one.=20 > The result is that all packets from stream S1 are being dropped and all > packets from Stream S2 are being sent.=20 > Ideally half of dropped packets would be from S1 and half from S1. > > What are possible solutions to this problem ? > > > Piotr Wojcicki > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > =20 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc