All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] First post, first problem
@ 2002-03-06 12:21 Mihai RUSU
  2002-03-06 12:43 ` Mihai RUSU
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mihai RUSU @ 2002-03-06 12:21 UTC (permalink / raw)
  To: lartc

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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] First post, first problem
  2002-03-06 12:21 [LARTC] First post, first problem Mihai RUSU
@ 2002-03-06 12:43 ` Mihai RUSU
  2002-03-06 13:02 ` bert hubert
  2002-03-06 13:20 ` Mihai RUSU
  2 siblings, 0 replies; 4+ messages in thread
From: Mihai RUSU @ 2002-03-06 12:43 UTC (permalink / raw)
  To: lartc

On Wed, 6 Mar 2002, Mihai RUSU wrote:

> 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
>

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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] First post, first problem
  2002-03-06 12:21 [LARTC] First post, first problem Mihai RUSU
  2002-03-06 12:43 ` Mihai RUSU
@ 2002-03-06 13:02 ` bert hubert
  2002-03-06 13:20 ` Mihai RUSU
  2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2002-03-06 13:02 UTC (permalink / raw)
  To: lartc

On Wed, Mar 06, 2002 at 02:43:52PM +0200, Mihai RUSU wrote:

> 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):

Fixed. Can you check if it is 100% ok now?

> "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

-- 
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] First post, first problem
  2002-03-06 12:21 [LARTC] First post, first problem Mihai RUSU
  2002-03-06 12:43 ` Mihai RUSU
  2002-03-06 13:02 ` bert hubert
@ 2002-03-06 13:20 ` Mihai RUSU
  2 siblings, 0 replies; 4+ messages in thread
From: Mihai RUSU @ 2002-03-06 13:20 UTC (permalink / raw)
  To: lartc

On Wed, 6 Mar 2002, bert hubert wrote:

> On Wed, Mar 06, 2002 at 02:43:52PM +0200, Mihai RUSU wrote:
>
> > 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):
>
> 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.

>
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2002-03-06 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-06 12:21 [LARTC] First post, first problem Mihai RUSU
2002-03-06 12:43 ` Mihai RUSU
2002-03-06 13:02 ` bert hubert
2002-03-06 13:20 ` Mihai RUSU

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.