Pawe� Krawczyk wrote:
>
> Hope I made no mistake, please correct me if I did - I'm still new to U32
> and all the above comes from lurking in the TC sources. There are also
> a lot of other options in TC filter command line:
>
> classid | flowid
> Specifies which CBQ class to select for matching selectors.
>
> police
> Sets destination for packets exceeding specific rate.
>
> However, I don't understand very well what the following one are for:
>
You should read the example-2 (u32 example) on
http://www.ittc.ukans.edu/~rsarav/howto/
Here is what I've understand of this example. If I'm wrong, please correct me!
> ht
>
What is better than an example? ;-) Here's what I've found on
http://www.ittc.ukans.edu/~rsarav/howto/ :
# Configuring the 6th slot of the hash table 1 to select packets with
# destination set to testbed11 and the port set to 6010 (0x177a) and direct
# these to class 2:2 (which was just set up).
tc filter add dev eth0 parent 2:0 prio 3 u32 ht 1:6: match ip dst
129.237.125.146 match tcp dst 0x177a 0xffff flowid 2:2
# Configuring the 6th slot of the hash table 2 to select packets with
# destination set to testbed11 and the port set to 6011 (0x177b) and direct
# these to class 2:3 (which was just set up).
tc filter add dev eth0 parent 2:0 prio 3 u32 ht 2:6: match ip dst
129.237.125.146 match tcp dst 0x177b 0xffff flowid 2:3
The ht keyword is just used to configure a hash table slot, it is followed by
the ID of the slot.
> divisor
Another example, from the same site :
# Creating hash tables for classification of the packets to testbed11
tc filter add dev eth0 parent 2:0 prio 3 handle 1: u32 divisor 256
tc filter add dev eth0 parent 2:0 prio 3 handle 2: u32 divisor 256
Here, with the keyword divisor, we create a hashtable of 256 slots.
> hashkey
Example :
# Lookup hash table and it it is not fragmented, use the protocol as the hash
# key.
tc filter add dev eth0 parent 2:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 1:
tc filter add dev eth0 parent 2:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 2:
hashkey keyword define what's the KEY to use to choose the corresponding hashtable
slot.
So in this example, it uses the protocol as the hash key. For example, if the
protocol is
TCP (0x6), it will choose the 6th slot of the hash table.
link
In the same example , link is followed by the htid. I think that it add a 'link' to
the corresponding
ht. Perhaps it means that the defined hashkey is for that htid... If someone could
confirm or infirm that...
offset
??? Need help too for that keyword...What does it mean in :
tc filter add dev eth0 parent 2:0 prio 3 handle ::1 u32 ht 800:: match ip
nofrag offset mask 0x0F00 shift 6 hashkey mask 0x00ff0000 at 8 link 2:
am I right or wrong with that :
hashkey mask 0x00ff0000 at 8
means the hashkey is at offset 8 with a mask of 0x00ff0000 ????
But this mask will result a value greater than 256??? That's not possible...
Where am I wrong? is the 'offset' keyword before important in this line?
what is handle ::1 ????
what is ht 800:: ????
>
> order and sample
Never seen those keywords used...
Thx in advance,
Seb.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]