setting up a U32 filter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I tried to set up a simple u32 filter and tried to use this filter to classify traffic to a (bounded,isolated) 2Mbit class. However, it does not work. I still get the full (~8Mbps on a 10 Mbps eth0) bw. I have trid with and without "split 1:0" and have tried to paly with weights without any success. Basically my filter is not working. (RH 6.1, kernel 2.2.12).
 
Any hints welcome.
Gautam
 
-------------- commands used to set things up -------------------

tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64

// no root class 1:1 needs to be set up, as far as I can tell. Setting up

// qdisc automatically sets up parent class 1:0 with all BW.

tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10Mbit rate 2Mbit bounded isolated allot 1514 cell 8 weight 2Mbit prio 3 maxburst 20 avpkt 1000 split 1:0

tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 10Mbit rate 7Mbit bounded isolated allot 1514 cell 8 weight 7Mbit prio 7 maxburst 20 avpkt 1000 split 1:0

tc filter add dev eth0 parent 1:0 prio 3 protocol ip u32

tc filter add dev eth0 parent 1:0 prio 3 handle 1: u32 divisor 256

tc filter add dev eth0 parent 1:0 prio 3 handle 2: u32 divisor 256       // GHT Note: I am not yet using this 2nd u32 filter

// match tcp traffic foing to 192.168.1.3, port 5000.

tc filter add dev eth0 parent 1:0 prio 3 u32 ht 1:6: match ip dst 192.168.1.3 match tcp dst 0x1388 0xffff flowid 1:2

 

------------------------------------------- output of "show state" commands to tc (for qdisc, class and filter states)

qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no-transmit

Sent 51083398 bytes 39708 pkts (dropped 0, overlimits 0)  // this count keeps going up.

backlog 3p

borrowed 0 overactions 0 avgidle 624 undertime 0

class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit

Sent 51083398 bytes 39708 pkts (dropped 0, overlimits 0)

borrowed 0 overactions 0 avgidle 552 undertime 0

class cbq 1:2 parent 1: rate 2Mbit (bounded,isolated) prio 3             // no traffic gets classified to this handle.

Sent 0 bytes 0 pkts (dropped 0, overlimits 0)

borrowed 0 overactions 0 avgidle 70957 undertime 0

class cbq 1:3 parent 1: rate 7Mbit (bounded,isolated) prio 7

Sent 0 bytes 0 pkts (dropped 0, overlimits 0)

borrowed 0 overactions 0 avgidle 7602 undertime 0

filter parent 1: protocol ip pref 3 u32

filter parent 1: protocol ip pref 3 u32 fh 2: ht divisor 256

filter parent 1: protocol ip pref 3 u32 fh 1: ht divisor 256

filter parent 1: protocol ip pref 3 u32 fh 1:6:800 order 2048 key ht 1 bkt 6 flowid 1:2

match c0a80103/ffffffff at 16

match 00001388/0000ffff at nexthdr+0

filter parent 1: protocol ip pref 3 u32 fh 800: ht divisor 1


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux