All of lore.kernel.org
 help / color / mirror / Atom feed
* SFQ + speed caps
@ 2014-08-06  8:59 Dimitris Kotsonis
  2014-08-06 21:21 ` Alan Goodman
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Dimitris Kotsonis @ 2014-08-06  8:59 UTC (permalink / raw)
  To: lartc

Hi everybody,

I am trying to find a solution to the following problem. I have a lan 
where pcs get a fair amount of the internet connection from a linux 
router. In order to do this I am using SFQ with "flow map key dst and 
0xff". This way each pc gets its own SFQ band. This setup is completely 
automatic and works exceptionally well. Two active pcs will get 50% of 
the line, three active pcs will get 33% of the line etc.

Now here comes the problem. What if in addition to a fair distribution 
of the connection I wanted to cap the speed of one pc to a specified 
hard limit. I can do something similar to this...

interface
  |
  +---- HTB --- class 1 (capped pc)
         |
         +----- class 2  (everything else)
                  |
                  +--- SFQ

  .. but this way I am getting the capped pc out of the SFQ round robin 
allowing it to monopolize the line up to its hard limit and in excess of 
what is currently fair. If, for example, the capped pc speed is set at 
40% of the line speed and there are 5 active pcs on the lan then the 
capped pc will managed to steal more than it's fair share of the line. 
It could manage to go all the way up to 40% instead of 20%.

It appears that HTB must be placed on top of SFQ for this to work:

interface
  |
+--- SFQ
         |
+---- HTB --- class 1 (capped pc)
                |
                +----- class 2  (everything else)

Only problem is, you can't attach a qdisc on top of another qdisc. You 
can only attach a qdisc on top of a class and SFQ is a classless qdisc.

So is there a solution to my problem ? Can you shape some flows 
dynamically and in addition to that shape one of those flows statically 
? I am shifting through the LARTC documentation trying to figure some 
way to do this but I can't think of any.

Any thoughts ?

Regards,

Dimitris.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-07 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06  8:59 SFQ + speed caps Dimitris Kotsonis
2014-08-06 21:21 ` Alan Goodman
2014-08-06 22:41 ` Dimitris Kotsonis
2014-08-07 14:41 ` Dimitris Kotsonis
2014-08-07 16:56 ` Dimitris Kotsonis
2014-08-07 22:14 ` Andy Furniss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.