3.18 Bug with traffic control filters

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

 



Hello all,
I recently discovered a long standing problem in 3.18 regarding tc u32 filters:

===========================

#!/bin/bash
INTERFACE=lan1
ADM_TOS=0x10
STR_TOS=0x04
DFL_TOS=0x00

tc qdisc del dev ${INTERFACE} root
tc qdisc add dev ${INTERFACE} root handle 1: prio bands 4 priomap 2 3 3 3 2 3 1 1 2 2 2 2 2 2 2 2
for band in $(seq 1 4); do
tc qdisc add dev ${INTERFACE} parent 1:$band handle $(expr $band + 20) pfifo
done

tc filter add dev ${INTERFACE} parent 1: protocol ip prio 2 u32 match ip tos ${ADM_TOS} 0x1E flowid 1:2
tc filter add dev ${INTERFACE} parent 1: protocol ip prio 3 u32 match ip tos ${STR_TOS} 0x1E flowid 1:3
tc filter add dev ${INTERFACE} parent 1: protocol ip prio 4 u32 match ip tos ${DFL_TOS} 0x1E flowid 1:4

uname -a >> test.log
tc filter show dev ${INTERFACE} >> test.log
===========================

I get the following log:
===========================
Linux himonn-0-011 3.18.76 #1 SMP Wed Oct 18 17:43:37 CEST 2017 i686 i686 i686 GNU/Linux
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1
===========================

The expected output (4.0.9 is fine) is:
===========================
Linux himonn-0-011 4.0.9 #1 SMP Wed Oct 18 17:10:02 CEST 2017 i686 i686 i686 GNU/Linux
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2
match 00100000/001e0000 at 0
filter parent 1: protocol ip pref 3 u32
filter parent 1: protocol ip pref 3 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:3
match 00040000/001e0000 at 0
filter parent 1: protocol ip pref 4 u32
filter parent 1: protocol ip pref 4 u32 fh 802: ht divisor 1
filter parent 1: protocol ip pref 4 u32 fh 802::800 order 2048 key ht 802 bkt 0 flowid 1:4
match 00000000/001e0000 at 0
===========================

The problem was obviously fixed in later releases, but I'm currently stuck at 3.18. Can anybody point me to the patch that fixed this problem (or alternatively that caused the breakage)? It's broken in 3.14, 3,15, 3.16 and 3.18 (didn't check 3.17) but it was fine in 3.13:
===========================
Linux himonn-0-011 3.13.11-ckt39 #2 SMP Wed Oct 18 14:42:49 CEST 2017 i686 i686 i686 GNU/Linux
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:2
match 00100000/001e0000 at 0
filter parent 1: protocol ip pref 3 u32
filter parent 1: protocol ip pref 3 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:3
match 00040000/001e0000 at 0
filter parent 1: protocol ip pref 4 u32
filter parent 1: protocol ip pref 4 u32 fh 802: ht divisor 1
filter parent 1: protocol ip pref 4 u32 fh 802::800 order 2048 key ht 802 bkt 0 flowid 1:4
match 00000000/001e0000 at 0
===========================

Thanks in advance
  Joerg



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]