Package: iproute2
Version: 4.14.1-1~bpo9+1
Severity: normal

Dear Maintainer,

I found some problems in tc class show and tc filter show commands. We
use tc in large scale (thousands of subnets) on multiple servers. Whole
shaping system is udergoing large overview and I'm rewriting it almost
from the scratch. Tc rules are one of key elements so I started to check
and change its whole structure. Until now we had everything in parent
qdisc 1:0 (all tc filter rules, tc classes). Now I decided to change it,
so a lot of classes have its own hfsc qdiscs and in this qdiscs I create
whole new structure of tc classes, tc filters a tc qdiscs. Let's say it
is a tree within a tree. I can provide simple (prototype) bash script,
which led to my discovery. (https://pastebin.com/A57x8fq5 - comments are
in czech since I didn't plan to release it anywhere :-) - I can provide
further info if needed.

Problem is very annoying since I need to get
stats from tc -s class show dev ...etc. 

1. First problem - tc class show dev enp0s31f6 prints whole structure
two times. I compared it with "sudo tc -s class show dev enp0s31f6" | grep
-c "class" vs "sudo tc -s class show dev enp0s31f6" | sort | uniq | grep
-c "class" which produces about a half of records. Reference class
2000:ffff (produced by my script 2000 - 4fff) is shown twice (same for
2000: root). I'm not sure about behavior of executing command twice
in this case but it can't be defined twice for sure. Tc is veeery picky
:-)

2. Second problem - tc filter show dev enp0s31f6 show just the parent
1:0 rules. This one is not so critical, since I don't read stats
regularly, but for debugging it is very inconvenient since one has to
know classId of whole parent (let's say 2000:0 qdisc in which all those
filters reside). When I execute tc filter show dev enp0s31f6 parent
2000: (including colon :-) I get all those defined filter rules and hash
tables. But not with base command.

I discovered this on version 4.9 from stable stretch repository. I tried
to install backport version 4.14 but resutls were exactly the same. I
didn't try to reboot after upgrade yet tho. I'll do this after finishing
this bugreport. I didn't try to compile newest version from source since
I need some kind of stable solution to put it on 21 servers.

What I expected was to see defined classes just once. And to see tc
filter rules with base show command without specifying parent's classid
for every hfsc qdisc containing additional rules and hash tables.


-- System Information:
Debian Release: 9.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-5-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages iproute2 depends on:
ii  libc6        2.24-11+deb9u3
ii  libdb5.3     5.3.28-12+deb9u1
ii  libelf1      0.168-1
ii  libmnl0      1.0.4-2
ii  libselinux1  2.6-3+b3

Versions of packages iproute2 recommends:
pn  libatm1       <none>
ii  libxtables12  1.6.0+snapshot20161117-6

Versions of packages iproute2 suggests:
ii  iproute2-doc  4.14.1-1~bpo9+1

-- no debconf information

Reply via email to