Re: [LARTC] filter hashkey without match

2007-08-03 Thread Frank Remetter
Hey,

> how do I match all the traffic?

$TC filter add dev $DEV protocol ip parent 1:0 prio 10 \
 u32 match u32 0 0 flowid X:XX

Regards
-- 
Frank Remetter
http://www.remetter.de/
GPG-FP: 2B07 B7D8 5C27 AB94 7A37  8B0B DEBE DD89 D68B 7BE6


signature.asc
Description: PGP signature
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] filter hashkey without match

2007-08-02 Thread Deepak Agarwal
Hi,

 

I need to set filter-hash and use source-port as hashkey. It seems that
I can't use "hashkey" without using "match".

 

I am using following commands:

tc qdisc add ... root handle 1:0 htb 

 

# Loop to add 1000 classes  (i = 1 to 1000)

tc class add ... parent 1:0 classid 1:$i

 

#set filters

tc filter add ... protocol ip parent 1:0 u32

tc filter add ... protocol ip parent 1:0 handle 2: u32 divisor 256

 

# Loop to add 1000 filter: one for each class

# $p is for port; $b is the bucket id (0 to 256); $f is for classid (1
to 1000)

tc filter add ... parent 1:0 u32 match ip sport $p 0x ht 2:$b:
flowid 1:$f

 

#hashkey

tc filter add ... protocol ip parent 1:0 u32 hashkey mask 0x at 20
link 2:

 

Problem is the last command. I want to match all the traffic coming to
the interface and use lower-order of the source-port to decide the
filter-bucket.

 

When I run the last command, it throws an error:

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

 

Do we need to necessarily use "match ip .." before using "hashkey"? If
so, how do I match all the traffic?

 

Thanks for the help,

deepak

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc