tcng questions ?
- Does tcng support HTB ? syntax ?
- what is the difference between "if" and "on" ? I'm reading the docs but can get it right ! "if" uses bool expressions and "on" is using only "u32", correct ?! what more?
- how can I tell tcng to use iptables for classifying and what is the syntax for it ?
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;
}
thanx alot
==iVAN
[email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 1 line · [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.
Quoted 1 line
- 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 !
Quoted 1 line
"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.
Quoted 1 line
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.
Quoted 2 lines
- 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.
Quoted 7 lines
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
Signature · 6 lines
_________________________________________________________________________ / 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/
Quoted 5 lines
Quoted 1 line · [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/
|> [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/
Hi Jacob,
please can you post the htb tcng patch to LARTC list ? [email protected] would test it in real environment ...
thanks, devik
Quoted 36 lines · 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 {(quoted diff) +0
-0class (<$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..
Quoted 7 lines
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/
Quoted 4 lines
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/
Here it is.
- Jacob
Quoted 7 lines · devik
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
Makefile +1 -0
@@ -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
VERSION +1 -1
@@ -1 +1 @@ -8r +8s
Index: tcc/Makefile
===================================================================
RCS file: /export/cvsroot/tcng/tcc/Makefile,v
retrieving revision 1.22
Makefile +1 -0
@@ -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
Parameters +3 -0
@@ -7,6 +7,8 @@ bandwidth rate bounded flag burst size +cburst size +ceil rate default flag default_index unum dport unum
@@ -42,6 +44,7 @@ protocol unum quantum size rate rate +r2q unum 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
if_u32.c +2 -0
@@ -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
q_htb.c new file +314 -0
314 lines not on this page · raw message
Index: tcc/qdisc.h
===================================================================
RCS file: /export/cvsroot/tcng/tcc/qdisc.h,v
retrieving revision 1.4
qdisc.h +1 -0
@@ -23,6 +23,7 @@extern QDISC_DSC red_dsc;extern QDISC_DSC sfq_dsc;extern QDISC_DSC tbf_dsc; +extern QDISC_DSC htb_dsc;void assign_qdisc_ids (QDISC *root);
Index: tcc/tcdefs.h
===================================================================
RCS file: /export/cvsroot/tcng/tcc/tcdefs.h,v
retrieving revision 1.1.1.1
tcdefs.h +2 -0
@@ -15,6 +15,8 @@#ifndef TCDEFS_H #define TCDEFS_H +#define TC_HTB_MAXLEVEL 8 +#define TC_HTB_MAXPRIO 8/* From linux/include/linux/pkt_sched.h */ #define TC_CBQ_MAXLEVEL 8
Index: tcc/tcng.l
===================================================================
RCS file: /export/cvsroot/tcng/tcc/tcng.l,v
retrieving revision 1.24
tcng.l +4 -0
@@ -92,6 +92,8 @@ bands return TOK_BANDS; bounded return TOK_BOUNDED; burst return TOK_BURST; +cburst return TOK_CBURST; +ceil return TOK_CEIL; default return TOK_DEFAULT; default_index return TOK_DEFAULT_INDEX; dport return TOK_DPORT;
@@ -104,6 +106,7 @@ fromif return TOK_FROMIF; grio return TOK_GRIO; hash return TOK_HASH; +htb return TOK_HTB; isolated return TOK_ISOLATED; indices return TOK_INDICES; ipproto return TOK_IPPROTO;
@@ -125,6 +128,7 @@ protocol return TOK_PROTOCOL; quantum return TOK_QUANTUM; rate return TOK_RATE; +r2q return TOK_R2Q; set_tc_index return TOK_SET_TC_INDEX; shift return TOK_SHIFT; skip return TOK_SKIP;
Index: tcc/tcng.y
===================================================================
RCS file: /export/cvsroot/tcng/tcc/tcng.y,v
retrieving revision 1.52
tcng.y +19 -3
@@ -265,11 +265,11 @@ %token TOK_PASS TOK_RECLASSIFY TOK_CONTINUE TOK_FIELD TOK_TAG %token TOK_FIELD_ROOT %token TOK_CONFORM TOK_COUNT TOK_PRECOND TOK_DROP TOK_IF_ANCHOR -%token TOK_CBQ TOK_DSMARK TOK_FIFO TOK_GRED TOK_PRIO TOK_RED TOK_SFQ +%token TOK_CBQ TOK_DSMARK TOK_FIFO TOK_GRED TOK_PRIO TOK_RED TOK_SFQ TOK_HTB %token TOK_TBF TOK_INGRESS TOK_EGRESS %token TOK_FW TOK_ROUTE TOK_RSVP TOK_TCINDEX %token TOK_AH TOK_ALLOT TOK_AVPKT TOK_BANDS TOK_BANDWIDTH TOK_BOUNDED -%token TOK_BURST +%token TOK_BURST TOK_CBURST TOK_CEIL %token TOK_DEFAULT TOK_DEFAULT_INDEX TOK_DPORT TOK_DST %token TOK_ECN TOK_ESP TOK_EWMA TOK_FALL_THROUGH %token TOK_FROM TOK_FROMIF TOK_GRIO TOK_HASH
@@ -1366,6 +1366,10 @@ { $$ = &tbf_dsc; } + | TOK_HTB + { + $$ = &htb_dsc; + } ; opt_qdisc_or_class_body:
@@ -1564,6 +1568,14 @@ $$ = param_make(&prm_burst,$2); /* check against expected psched_mtu */ } + | TOK_CBURST constant_expression + { + $$ = param_make(&prm_cburst,$2); + } + | TOK_CEIL constant_expression + { + $$ = param_make(&prm_ceil,$2); + } | TOK_DEFAULT { $$ = param_make(&prm_default,data_unum(1));
@@ -1700,7 +1712,7 @@ | TOK_PRIO constant_expression { $$ = param_make(&prm_prio,$2); - NONZERO($$); + // NONZERO($$); jacobt add check in prio and cbq } | TOK_PRIOMAP forward_class_list {
@@ -1724,6 +1736,10 @@ { $$ = param_make(&prm_rate,$2); /* NONZERO($$); @@@ policer may have zero rate */ + } + | TOK_R2Q constant_expression + { + $$ = param_make(&prm_r2q,$2); } | TOK_SET_TC_INDEX {
in the tcng directory i'm doing this :
patch -b /path/tcng_htb.patch
it cant find which files to patch, i tried also "-p1" to "-p5" ...
what I'm doing wrong
thanx alot
[email protected]
PS. one of the errors : it tries to patch tcc/Parameters but there is no such file, there is tcc/PARAMETERS .... (tcng-8s)
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/