From: Alexey Toptygin Date: Tue, 24 May 2005 20:26:40 +0000 Subject: [LARTC] four tc filter and netem questions Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org The following (occuring on debian/testing with kernel-image-2.6.8-2-386 version 2.6.8-13 and iproute version 20041019-3) confuses me: # tc qdisc add dev eth0 root handle 1: prio # tc filter add dev eth0 parent 1: proto ip pref 1 handle 1 fw classid 1:2 # tc filter ls dev eth0 filter parent 1: protocol ip pref 1 fw filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:2 # tc filter del dev eth0 parent 1: proto ip prio 1 fw # tc filter ls dev eth0 # tc filter add dev eth0 parent 1: proto ip pref 1 handle 1 fw classid 1:2 RTNETLINK answers: Invalid argument We have an error talking to the kernel # tc filter ls dev eth0 filter parent 1: protocol ip pref 1 fw # tc filter del dev eth0 parent 1: proto ip prio 1 fw # tc filter ls dev eth0 # tc filter add dev eth0 parent 1: proto ip pref 1 handle 1 fw classid 1:2 RTNETLINK answers: Invalid argument We have an error talking to the kernel # tc qdisc del dev eth0 root # tc qdisc add dev eth0 root handle 1: prio # tc filter add dev eth0 parent 1: proto ip pref 1 handle 1 fw classid 1:2 # tc filter ls dev eth0 filter parent 1: protocol ip pref 1 fw filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:2 # tc filter del dev eth0 parent 1: proto ip pref 1 handle 1 fw # tc filter ls dev eth0 filter parent 1: protocol ip pref 1 fw # tc filter add dev eth0 parent 1: proto ip pref 1 handle 1 fw classid 1:2 # tc filter ls dev eth0 filter parent 1: protocol ip pref 1 fw filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:2 # What is going on? Why are 2 entries created at first, then, if I delete the one without a handle they both dissapear but I can't recreate the one with the handle? Why is it if I delete the one with the handle, it is the only one deleted, and can be re-added and re-deleted just fine? What are filter handles actually used for? Should I just omit the handle to make everything better? Second, tc doesn't seem to want me to create filters without a filter type, so how should I create a filter that will always match? i.e. I want a prio 1 filter based on u32, then a prio 2 filter based on fw, then a prio 3 filter that will match everything that the prio 1 and 2 filters didn't get? Thirdly, I haven't seen this actually written down anywhere, so I'd like to double check: the fw filter matches any packet with non-zero fwmark value, yes? Finally, when using netem `tc qdisc ls` always shows a duplicate value of around %75, even when I don't set it, and setting the duplicate value seems to have no effect. Is this a header mismatch between the kernel and userland? Apologies to those who don't like multiple questions in one email :-) Alexey _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc