HFSC and FQ-CoDel integration

2017-05-28 Thread Mike Belopuhov
This is a first stab at HFSC and FQ-CoDel integration via extending PF queueing operations (pfq_ops) interface. With this FQ-CoDel can be attached directly to an interface as well as serve as a replacement for the HFSC queue to improve its characteristics. In essence, in many setups (router

Pf manpage update for FQ-CoDel

2017-05-12 Thread Mike Belopuhov
I've tried very hard to make it concise and avoided any references to underlying algorithms. OK? --- share/man/man5/pf.conf.5 | 47 --- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git share/man/man5/pf.conf.5 share/man/man5/pf.conf.5 index

Re: Pf interface for FQ-CoDel

2017-05-12 Thread Mike Belopuhov
On Fri, Apr 28, 2017 at 19:58 +0200, Mike Belopuhov wrote: > This is the last bit required in order to actually be able to > use FQ-CoDel. It might require some polish, but I think there's > nothing exceptionally ugly barring the statistics interface. > > fqcodel_stats is c

CoDel FSM fixup

2017-05-05 Thread Mike Belopuhov
look good? diff --git sys/net/fq_codel.c sys/net/fq_codel.c index 1c380f49f3d..c7fe38a7094 100644 --- sys/net/fq_codel.c +++ sys/net/fq_codel.c @@ -370,11 +370,11 @@ codel_next_packet(struct codel *cd, struct codel_params *cp, int64_t now, *drop = 1; } retu

Re: FQ-CoDel: Flow Queue - Controlled Delay

2017-05-02 Thread Mike Belopuhov
k everything before getting this in. > > > > > > Would it be worth converting codel_intervals from us to ns so you > > > don't need to multiply by 1000 in so many places? > > > > Nevermind, I see that most of codel is in terms of us not ns, so > &

Re: FQ-CoDel: Flow Queue - Controlled Delay

2017-05-02 Thread Mike Belopuhov
s to ns so you > > don't need to multiply by 1000 in so many places? > > Nevermind, I see that most of codel is in terms of us not ns, so > it is probably simplest to leave it that way for now. > > - todd The trade off is basically the double the size of the table. It's a bit above 1.5Kb right now and if I convert everything to ns, it'll be just below 4K. Which is also OK I guess.

Re: FQ-CoDel: Flow Queue - Controlled Delay

2017-05-02 Thread Todd C. Miller
; > > I think I've got all of the conversion right, but will double- > > check everything before getting this in. > > Would it be worth converting codel_intervals from us to ns so you > don't need to multiply by 1000 in so many places? Nevermind, I see that most of codel

Re: FQ-CoDel: Flow Queue - Controlled Delay

2017-05-02 Thread Todd C. Miller
On Tue, 02 May 2017 18:59:44 +0200, Mike Belopuhov wrote: > After switching the ph_timestamp to int64_t, the implementation > can be re-adjusted to use int64_t timestamps throughout. > > I think I've got all of the conversion right, but will double- > check everything before getting this in. Wou

Re: FQ-CoDel: Flow Queue - Controlled Delay

2017-05-02 Thread Mike Belopuhov
On Fri, Apr 28, 2017 at 17:36 +0200, Mike Belopuhov wrote: > This is an implementation of an FQ-CoDel algorithm that relies > on Pf for configuration and providing flow information via its > stateful inspection. > Thanks for mpi@, visa@ and sthen@ for looking through the code! Aft

Pf interface for FQ-CoDel

2017-04-28 Thread Mike Belopuhov
This is the last bit required in order to actually be able to use FQ-CoDel. It might require some polish, but I think there's nothing exceptionally ugly barring the statistics interface. fqcodel_stats is constructed to have a few fields "compatible" with the hfsc_class_stats s

FQ-CoDel: Flow Queue - Controlled Delay

2017-04-28 Thread Mike Belopuhov
This is an implementation of an FQ-CoDel algorithm that relies on Pf for configuration and providing flow information via its stateful inspection. The purpose of FQ-CoDel is to provide fair sharing of bandwidth to simultaneous connections (flows in FQ-CoDel terminology) of different types in

Re: CoDel

2012-08-15 Thread Geoff Steckel
On 08/15/2012 09:07 AM, Henning Brauer wrote: > * Simon Perreault [2012-08-15 14:38]: >> Le 2012-08-14 20:29, David Gwynne a écrit : >>> ill have to fix that. >> Oh, and I also realized that CBQ is even worse: it calls >> microuptime() on every enqueue *and* every dequeue! >> >> If it really was a

Re: CoDel

2012-08-15 Thread Henning Brauer
* Simon Perreault [2012-08-15 14:38]: > Le 2012-08-14 20:29, David Gwynne a écrit : > >ill have to fix that. > > Oh, and I also realized that CBQ is even worse: it calls > microuptime() on every enqueue *and* every dequeue! > > If it really was a bug, people would have noticed, no? altq being s

Re: CoDel

2012-08-15 Thread Simon Perreault
queue time. altq_hfsc_dequeue() --> read_machclk() --> microuptime() Looks like codel won't be slowing hfsc down at least. :) Simon

Re: CoDel

2012-08-14 Thread David Gwynne
> have to do that again. :) > > Hey I just realized that hfsc calls microuptime() for every single packet at dequeue time. > > altq_hfsc_dequeue() --> read_machclk() --> microuptime() > > Looks like codel won't be slowing hfsc down at least. :) > > Simon

Re: CoDel

2012-08-14 Thread Simon Perreault
queue time. altq_hfsc_dequeue() --> read_machclk() --> microuptime() Looks like codel won't be slowing hfsc down at least. :) Simon

Re: CoDel

2012-08-14 Thread Ted Unangst
On Tue, Aug 14, 2012 at 11:13, Simon Perreault wrote: > Le 2012-08-14 11:03, Ted Unangst a écrit : >> On Tue, Aug 14, 2012 at 09:42, Simon Perreault wrote: >> >>> - CoDel needs to timestamp each packet when it gets queued. >>> - I added a new member in struct pkt

Re: CoDel

2012-08-14 Thread Simon Perreault
Le 2012-08-14 11:03, Ted Unangst a écrit : On Tue, Aug 14, 2012 at 09:42, Simon Perreault wrote: - CoDel needs to timestamp each packet when it gets queued. - I added a new member in struct pkthdr for this. Is this ok? - I end up calling microuptime() for each packet. Is this ok? You want to

Re: CoDel

2012-08-14 Thread Ted Unangst
On Tue, Aug 14, 2012 at 09:42, Simon Perreault wrote: > - CoDel needs to timestamp each packet when it gets queued. > - I added a new member in struct pkthdr for this. Is this ok? > - I end up calling microuptime() for each packet. Is this ok? You want to use getmicrouptime, it'

CoDel

2012-08-14 Thread Simon Perreault
Hi tech@, I started implementing CoDel[1] in altq, as an alternative to RED. It's based on the Linux implementation, which is dual-licensed GPL/BSD. I'm looking for early feedback (design, big issues, etc.). Work-in-progress diff is below. The big issues I see are: - CoDel needs to