]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6, trace: fix tos reporting on fib6_table_lookup
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 18 Mar 2016 17:37:59 +0000 (18:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Mar 2016 17:44:34 +0000 (13:44 -0400)
commit4ae11a051c55b62b72c0b30e380fc47f42e701cd
treedea003dce3acd0e36e5a248b49fd159a8c76845f
parent50fabd5be3e036a5e04a45e64d35c7608465493f
ipv6, trace: fix tos reporting on fib6_table_lookup

flowi6_tos of struct flowi6 is unused in IPv6, therefore dumping tos on
that tracepoint will also give incorrect information wrt traffic class.

If we want to fix it, we need to extract it via ip6_tclass(flp->flowlabel).
While for the same test case I get a count of 0 non-zero tos values before
the change, they now start to show up after the change:

  # ./perf record -e fib6:fib6_table_lookup -a sleep 10
  # ./perf script | grep -v "tos 0" | wc -l
  60

Since there's no user in the kernel tree anymore of flowi6_tos, remove the
define to avoid any future confusion on this.

Fixes: 292635d0e277 ("net: IPv6 fib lookup tracepoint")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow.h
include/trace/events/fib6.h