I want to use tc prio queuing discpline for scheduling packets in a particular order. I want to send out packets to destination port 5555 with the highest priority and packets to destination port 6666 with medium priority and all the other packets with the lowest priority. I wanted the ordering to be done based on this and not based on the TOS fields. So I defined 3 bands as follows:
- tc qdisc add dev eth1 root handle 1: prio bands 3 priomap 1 1 1 2 2 2 2 2 3 3 3 3 3 3 3 3
- tc qdisc add dev eth1 parent 1:1 pfifo
- tc filter add dev eth1 parent 1: protocol ip prio 1 u32 match ip dport 5555 0xffff flowid 1:1
- tc qdisc add dev eth1 parent 1:2 pfifo
- tc filter add dev eth1 parent 1: protocol ip prio 2 u32 match ip dport 6666 0xffff flowid 1:2
- tc qdisc add dev eth1 parent 1:4 pfifo
- tc filter add dev eth1 parent 1: protocol ip prio 3 u32 match ip dst 0.0.0.0/0 flowid 1:3
where eth1 is the egress interface.
Will this work without setting the TOS fields? Also to test it, I ran UDP traffic to port 8888 at say 500M rate using iperf on the 100Mbps eth1 interface and then when this traffic was running, I started traffic to port 5555 which has the highest priority at 100M. But it didn't look like all the traffic was going over port 5555 first and the packets for port 8888 were getting dropped.
Can anyone help with clarifying how prio queuing discpline is supposed to work.