stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 3.18 Bug with traffic control filters
@ 2017-10-18 16:30 Klaus Kinski
  2017-10-18 16:45 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Kinski @ 2017-10-18 16:30 UTC (permalink / raw)
  To: stable@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-24  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 16:30 3.18 Bug with traffic control filters Klaus Kinski
2017-10-18 16:45 ` Greg KH
2017-10-24  9:53   ` AW: " J Pommnitz
     [not found]   ` <AM4PR07MB169748FB63CFB28562A942C6FC470@AM4PR07MB1697.eurprd07.prod.outlook.com>
2017-10-24  9:54     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).