Re: [LARTC] tcng questions ?
Here it is. - Jacob On Mon, Jul 15, 2002 at 08:22:25AM +, devik wrote: > Hi Jacob, > > please can you post the htb tcng patch to LARTC list ? > [EMAIL PROTECTED] would test it in real environment ... > > thanks, devik > Index: Makefile === RCS file: /export/cvsroot/tcng/Makefile,v retrieving revision 1.124 diff -u -r1.124 Makefile --- Makefile26 May 2002 06:27:52 - 1.124 +++ Makefile6 Jun 2002 01:46:47 - @@ -50,6 +50,7 @@ tcc/sprintf.h tcc/sprintf.c \ tcc/device.h tcc/device.c \ tcc/qdisc.h tcc/qdisc.c tcc/qdisc_common.h tcc/q_ingress.c tcc/q_cbq.c \ + tcc/q_htb.c \ tcc/q_dsmark.c tcc/q_fifo.c tcc/q_gred.c tcc/q_prio.c tcc/q_red.c \ tcc/q_sfq.c tcc/q_tbf.c tcc/csp.c \ tcc/filter.h tcc/filter.c tcc/filter_common.h tcc/f_if.c tcc/f_fw.c \ Index: VERSION === RCS file: /export/cvsroot/tcng/VERSION,v retrieving revision 1.127 diff -u -r1.127 VERSION --- VERSION 31 May 2002 12:26:35 - 1.127 +++ VERSION 6 Jun 2002 23:15:54 - @@ -1 +1 @@ -8r +8s Index: tcc/Makefile === RCS file: /export/cvsroot/tcng/tcc/Makefile,v retrieving revision 1.22 diff -u -r1.22 Makefile --- tcc/Makefile17 May 2002 04:42:25 - 1.22 +++ tcc/Makefile6 Jun 2002 01:43:29 - @@ -13,6 +13,7 @@ OBJS=lex.yy.o y.tab.o tcc.o util.o error.o var.o data.o param.o device.o \ registry.o u128.o sprintf.o \ qdisc.o q_ingress.o q_cbq.o q_dsmark.o q_fifo.o q_gred.o q_prio.o \ + q_htb.o \ q_red.o q_sfq.o q_tbf.o csp.o \ filter.o f_if.o f_fw.o f_route.o f_rsvp.o f_tcindex.o \ police.o tc.o op.o field.o named.o \ Index: tcc/Parameters === RCS file: /export/cvsroot/tcng/tcc/Parameters,v retrieving revision 1.3 diff -u -r1.3 Parameters --- tcc/Parameters 26 Jan 2002 19:31:40 - 1.3 +++ tcc/Parameters 27 Jun 2002 19:11:19 - @@ -7,6 +7,8 @@ bandwidth rate boundedflag burst size +cburst size +ceil rate defaultflag default_index unum dport unum @@ -42,6 +44,7 @@ protocol unum quantumsize rate rate +r2qunum set_tc_index flag shift unum skip size Index: tcc/if_u32.c === RCS file: /export/cvsroot/tcng/tcc/if_u32.c,v retrieving revision 1.11 diff -u -r1.11 if_u32.c --- tcc/if_u32.c21 May 2002 06:44:39 - 1.11 +++ tcc/if_u32.c8 Jun 2002 00:17:25 - @@ -941,7 +941,9 @@ tc_pragma(filter->params); for (i = 0; i < 2; i++) { +// to uncover everything if (!i) { +// first time d = data_clone(qdisc->if_expr); d = op_binary(&op_logical_or,d,data_decision(dr_continue,NULL)); } Index: tcc/q_htb.c === RCS file: tcc/q_htb.c diff -N tcc/q_htb.c --- /dev/null 1 Jan 1970 00:00:00 - +++ tcc/q_htb.c 27 Jun 2002 19:42:35 - @@ -0,0 +1,314 @@ +/* + * q_htb.c - Hierachical Token Bucket Queuing qdisc + + * + * Written 2002 by Jacob Teplitsky + * Copyright 2002 Bivio Networks. + */ + + +#include + +#include "tcdefs.h" +#include "util.h" +#include "error.h" +#include "data.h" +#include "param.h" +#include "tree.h" +#include "field.h" +#include "op.h" +#include "tc.h" +#include "ext.h" +#include "filter.h" +#include "qdisc_common.h" +#include "qdisc.h" + + +/* --- Checking */ + + +#define __DEFAULT_PRM(f) f(burst) f(ceil) f(cburst) f(prio) f(quantum) f(rate) +#define __DEFAULT_PRM_REQ(f) f(rate) + +static void htb_check_classes(CLASS **classes,DEFAULT_ARGS,int depth, int +*got_default) +{ +CLASS *class; + +if (!*classes) return; +sort_classes(classes); +if (depth == TC_HTB_MAXLEVEL) + lerrorf((*classes)->location, + "can't nest HTB classes deeper than %d levels",TC_HTB_MAXLEVEL); +for (class = *classes; class; class = class->next) { + DEFAULT_DECL_SAVED; + + param_get(class->params,class->location); + DEFAULT_GET; + if (class->number != 0) { +DEFAULT_CHECK(class->location); + } + DEFAULT_SAVE; + if (class->number != 0) { +if (!prm_rate.v) lerror(class->location,"rate must be non-zero"); + } + if (prm_ceil.present && prm_ceil.v < prm_rate.v) + lerrorf(class->location,"\"ceil\" (%lu) > \"rate\" (%lu)", + (unsigned long) prm_ceil.v,(unsigned long) prm_rate.v); + if (prm_prio.present && prm_prio.v > TC_HTB_MAXPRIO) + lerrorf(class->location,"\"prio\" (%lu) > %d", + (unsigned long) prm_prio.v,TC_HTB_MAXP
Re: [LARTC] tcng questions ?
> Hi Jacob, > > please can you post the htb tcng patch to LARTC list ? > [EMAIL PROTECTED] would test it in real environment ... I'd like to test tcng with htb, to :) Greetings Tobias ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] tcng questions ?
Hi Jacob, please can you post the htb tcng patch to LARTC list ? [EMAIL PROTECTED] would test it in real environment ... thanks, devik On Sun, 14 Jul 2002 [EMAIL PROTECTED] wrote: > > > > > |> [EMAIL PROTECTED] wrote: > |> > - Does tcng support HTB ? syntax ? > |> > |> Not yet. Someone's working on implementing support for it, so I > |> hope to have it in the not too distant future. > | > |Jacob have it done. He sent me some results for checking > |and althought I have no time to test the latest one it > |seems to work. > > ]- will u post a note on the list when it is integrated ? and if not soon, a patch >to current tcng will be good if possible ? > I'm going to build a qos server after 1-2 weeks and want not to use CBQ :") > > > > dev eth0 { > egress { > class (<$c1>) if ...; > class (<$c2>) if ...; > drop if 1; > > name_of_qdisc { > $c1 = class (1); > $c2 = class (1); > } > } > } > > > ]- yep I forgot about the "egress" :"), still learning . my last time working >with QoS was before a year or so and i was using flat-structure generated by a perl >script I've done, but now tcng seems much more powerfull, easy and extendible.. and >as I see the lartc-howto is very good (finally good and comprehensive >documentation), thank you for the good work.. > > > thanx alot > > [EMAIL PROTECTED] > ___ > LARTC mailing list / [EMAIL PROTECTED] > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] tcng questions ?
|> [EMAIL PROTECTED] wrote: |> > - Does tcng support HTB ? syntax ? |> |> Not yet. Someone's working on implementing support for it, so I |> hope to have it in the not too distant future. | |Jacob have it done. He sent me some results for checking |and althought I have no time to test the latest one it |seems to work. ]- will u post a note on the list when it is integrated ? and if not soon, a patch to ]current tcng will be good if possible ? I'm going to build a qos server after 1-2 weeks and want not to use CBQ :") dev eth0 { egress { class (<$c1>) if ...; class (<$c2>) if ...; drop if 1; name_of_qdisc { $c1 = class (1); $c2 = class (1); } } } ]- yep I forgot about the "egress" :"), still learning . my last time working with ]QoS was before a year or so and i was using flat-structure generated by a perl script ]I've done, but now tcng seems much more powerfull, easy and extendible.. and as I see ]the lartc-howto is very good (finally good and comprehensive documentation), thank ]you for the good work.. thanx alot [EMAIL PROTECTED] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] tcng questions ?
> [EMAIL PROTECTED] wrote: > > - Does tcng support HTB ? syntax ? > > Not yet. Someone's working on implementing support for it, so I > hope to have it in the not too distant future. Jacob have it done. He sent me some results for checking and althought I have no time to test the latest one it seems to work. devik ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] tcng questions ?
[EMAIL PROTECTED] wrote: > - Does tcng support HTB ? syntax ? Not yet. Someone's working on implementing support for it, so I hope to have it in the not too distant future. > - what is the difference between "if" and "on" ? "on" gives direct access to the filters of Linux traffic control, while "if" provides a more abstract language. I'm reading the docs but can get it right ! > "if" uses bool expressions and "on" is using only "u32", correct ?! Half of it ;-) "on" supports all filters except u32. "if" uses u32 to do its work. > what more? Eventually, I plan to phase out "on". If you look at the documentation, the elements in "The tcng language" are here to stay, while the ones in "Under the hood" may change, and the ones in "Historical constructs" should eventually disappear. > - how can I tell tcng to use iptables for classifying and what is the > syntax for it ? You'll have to use the "fw" classifier. tcng doesn't touch iptables directly, so you'd have to set up that classification separately. For static classification, "if" is probably more convenient to use than a mixture of iptables and tcng. > if I want all packets that are not classified to be dropped what i have to do, is >this correct : > > dev eth0 { >class (1) if ; >class (2) if ; >class (3) drop if 1; > } It's either dev eth0 { name_of_qdisc { /* except if that qdisc is prio and your kernel isn't very very recent */ class (1) if ...; class (2) if ...; drop if 1; } } Or, better dev eth0 { egress { class (<$c1>) if ...; class (<$c2>) if ...; drop if 1; name_of_qdisc { $c1 = class (1); $c2 = class (1); } } } The second form gives you a better separation of classification and queuing, and you also don't have to worry about drop not working (in the case of "prio"). As a disadvantage, the second form adds an indirection through "dsmark" and "tcindex". - Werner -- _ / Werner Almesberger, Buenos Aires, Argentina [EMAIL PROTECTED] / /_http://icapeople.epfl.ch/almesber/_/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/