# tc - u32 match doesn't work

## Beju

Hello, I have a problem with tc. I've set a basic QoS on my router with this small script:

```
tc qdisc del dev eth0 root

tc qdisc add dev eth0 root handle 1: htb default 12

tc class add dev eth0 parent 1: classid 1:1  htb rate 100kbps ceil 100kbps

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 50kbps ceil 50kbps

tc class add dev eth0 parent 1:1 classid 1:11 htb rate 20kbps ceil 20kbps

tc class add dev eth0 parent 1:1 classid 1:12 htb rate 30kbps ceil 30kbps

tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 match ip src 192.168.1.193 flowid 1:10

tc filter add dev eth0 parent 1:0 prio 1 protocol ip u32 match ip src 192.168.0.193 flowid 1:11

tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5

tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5

tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10
```

Unfortunately, the "u32 match ip src" doesn't work and all incoming traffic goes to class 1:12. Do I need some kernel options to use u32? This is the output of tc -s -d qdisc show, after downloading some data from 192.168.1.193:

```
qdisc htb 1: dev eth0 root r2q 10 default 12 direct_packets_stat 1 ver 3.17

 Sent 371259 bytes 346 pkt (dropped 0, overlimits 472 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0 

qdisc pfifo 20: dev eth0 parent 1:10 limit 5p

 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0 

qdisc pfifo 30: dev eth0 parent 1:11 limit 5p

 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0 

qdisc sfq 40: dev eth0 parent 1:12 limit 127p quantum 1514b flows 127/1024 perturb 10sec 

 Sent 370279 bytes 344 pkt (dropped 0, overlimits 0 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0 

qdisc pfifo_fast 0: dev eth2 root bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

 Sent 8923 bytes 59 pkt (dropped 0, overlimits 0 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0 

qdisc pfifo_fast 0: dev eth1 root bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

 Sent 544167 bytes 6372 pkt (dropped 0, overlimits 0 requeues 0) 

 rate 0bit 0pps backlog 0b 0p requeues 0
```

----------

