Hello,
I want to use HTB to limit bandwidth, but classifying packets is not quiet clear to me. For example I have several classes and i want to classify packets both by ip and ports, and put them into different classes. So what happens if there's a packet that matches both classifiers (the one based on ip and the other ont based on port)?

For example:
tc qdisc del dev rl0 root handle 1:
tc qdisc add dev rl0 root handle 1: htb default 12
tc class add dev rl0 parent 1: classid 1:1 htb rate 45kbps ceil 45kbps
tc class add dev rl0 parent 1:1 classid 1:11 htb rate 20kbps ceil 20kbps
tc class add dev rl0 parent 1:1 classid 1:12 htb rate 20kbps ceil 25kbps
tc filter add dev rl0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:11
tc filter add dev rl0 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.0.1 flowid 1:12

So what happens if a packet arrives that goes to port 80 from ip 192.168.0.1 ?