First post, first problem
Hi
I've searched the archives for this and doesnt seem to be any message with this problem. Im trying to optimize a high load CBQ server using u32 hashes as in
http://lartc.org/HOWTO//cvs/2.4routing/output/2.4routing-12.html#ss12.4
Although Ive double checked the kernel options, and also other u32 filters work very well, when I try this line I get an error:
/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: u32 divisor 256 RTNETLINK answers: Invalid argument
I am currently using a 2.4.9-21SGI_XFS_1.0.2 kernel version.
Are this hashes supported only in a newer kernel version?
Thanks
----------------------------
Mihai RUSU
Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines · Mihai RUSU
Hi
I've searched the archives for this and doesnt seem to be any message with this problem. Im trying to optimize a high load CBQ server using u32 hashes as in
http://lartc.org/HOWTO//cvs/2.4routing/output/2.4routing-12.html#ss12.4
Quoted 6 lines
Although Ive double checked the kernel options, and also other u32 filters work very well, when I try this line I get an error:
/sbin/tcfilter add dev eth0 parent 1:0 prio 5 handle 2: u32 divisor 256 RTNETLINK answers: Invalid argument
Well I found out the "problem" . You cannot have u32 filter witout telling the protocol too. The correct line should be:/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256
There is also another error in the HOWTO (I think):
"Ok, some numbers need explaining. The default hash table is called 800::
and all filtering starts there. Then we select the source address, which lives as position 12, 13, 14 and 15 in the IP header, and indicate that we are only interested in the last part. This we send to hash table 1:, which we created earlier."
This is wrong. The hash table in in fact 2: and not 1: .
----------------------------
Mihai RUSU
Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Mihai RUSU
Well I found out the "problem" . You cannot have u32 filter witout telling the protocol too. The correct line should be:
/sbin/tcfilter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256There is also another error in the HOWTO (I think):
Fixed. Can you check if it is 100% ok now?
Quoted 7 lines
"Ok, some numbers need explaining. The default hash table is called 800::
and all filtering starts there. Then we select the source address, which lives as position 12, 13, 14 and 15 in the IP header, and indicate that we are only interested in the last part. This we send to hash table 1:, which we created earlier."This is wrong. The hash table in in fact 2: and not 1: .
Fixed too, and added you to the 'thanks to' list. Thanks!
Regards,
bert
Signature · 6 lines
http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 11 lines · bert hubert
Quoted 6 lines · Mihai RUSU
Well I found out the "problem" . You cannot have u32 filter witout telling the protocol too. The correct line should be:
/sbin/tcfilter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256There is also another error in the HOWTO (I think):
Fixed. Can you check if it is 100% ok now?
It seems ok. Anyway I also have another question about that part of the HOWTO.
In the example there it appears to be a line that doesnt do nothing (at least for me):
"Configuration is pretty complicated, but very worth it by the time you have this many rules. First we make a filter root, then we create a table with 256 entries:
# tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32 # tc filter add dev eth1 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256"
the first line:
# tc filter add dev eth1 parent 1:0 prio 5 protocol ip u32
What is the porpose of this line? Because I removed it from my test configuration and it works the same (the hashes). I even did a 2 level hash and I can say its the COOOLEST THING I have found yet in linux. This CBQ rules ! :)
This is my test configuration in case somebody needs it:
/sbin/tc qdisc del dev eth0 root/sbin/tc qdisc add dev eth0 root handle 1: cbq bandwidth 100Mbit allot 1514 avpkt 1000 cell 8
/sbin/tc class add dev eth0 parent 1: classid 1:1 cbq bandwidth 100Mbit rate 100Mbit avpkt 1000 prio 8 allot 1514 weight 1 maxburst 21
/sbin/tc class add dev eth0 parent 1:1 classid 1:10 estimator 1sec 8sec cbq bandwidth 100Mbit rate 16kbit avpkt 1000 prio 5 allot 1514 weight 1 maxburst 21 bounded
/sbin/tc class add dev eth0 parent 1:1 classid 1:20 estimator 1sec 8sec cbq bandwidth 100Mbit rate 128kbit avpkt 1000 prio 5 allot 1514 weight 1 maxburst 21 bounded
/sbin/tc qdisc add dev eth0 parent 1:10 pfifo limit 131 /sbin/tc qdisc add dev eth0 parent 1:20 pfifo limit 131
/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 2: protocol ip u32 divisor 256/sbin/tc filter add dev eth0 parent 1:0 prio 5 handle 3: protocol ip u32 divisor 256
/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 800::
match ip dst 0/0 hashkey mask 0x0000ff00 at 16 link 2:
/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 2:7b match ip dst 0/0 hashkey mask 0x000000ff at 16 link 3:
/sbin/tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32 ht 3:7c match ip dst 0/0 flowid 1:20
In this example I limit the traffic towards any x.y.123.124 IP.
Quoted 3 lines
Fixed too, and added you to the 'thanks to' list. Thanks!
Thanks, Im very proud to be near * Rusty Russell <rusty%rustcorp.com.au> :)))
----------------------------
Mihai RUSU
Disclaimer: Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of any company, unless otherwise specifically stated.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/