Skip to content
Snippets Groups Projects
Commit 69716a2b authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller
Browse files

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: b811580d ("net: IPv6 fib lookup tracepoint")
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95caf6f7
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,6 @@ struct flowi6 { ...@@ -127,7 +127,6 @@ struct flowi6 {
#define flowi6_oif __fl_common.flowic_oif #define flowi6_oif __fl_common.flowic_oif
#define flowi6_iif __fl_common.flowic_iif #define flowi6_iif __fl_common.flowic_iif
#define flowi6_mark __fl_common.flowic_mark #define flowi6_mark __fl_common.flowic_mark
#define flowi6_tos __fl_common.flowic_tos
#define flowi6_scope __fl_common.flowic_scope #define flowi6_scope __fl_common.flowic_scope
#define flowi6_proto __fl_common.flowic_proto #define flowi6_proto __fl_common.flowic_proto
#define flowi6_flags __fl_common.flowic_flags #define flowi6_flags __fl_common.flowic_flags
...@@ -135,6 +134,7 @@ struct flowi6 { ...@@ -135,6 +134,7 @@ struct flowi6 {
#define flowi6_tun_key __fl_common.flowic_tun_key #define flowi6_tun_key __fl_common.flowic_tun_key
struct in6_addr daddr; struct in6_addr daddr;
struct in6_addr saddr; struct in6_addr saddr;
/* Note: flowi6_tos is encoded in flowlabel, too. */
__be32 flowlabel; __be32 flowlabel;
union flowi_uli uli; union flowi_uli uli;
#define fl6_sport uli.ports.sport #define fl6_sport uli.ports.sport
......
...@@ -37,7 +37,7 @@ TRACE_EVENT(fib6_table_lookup, ...@@ -37,7 +37,7 @@ TRACE_EVENT(fib6_table_lookup,
__entry->tb_id = tb_id; __entry->tb_id = tb_id;
__entry->oif = flp->flowi6_oif; __entry->oif = flp->flowi6_oif;
__entry->iif = flp->flowi6_iif; __entry->iif = flp->flowi6_iif;
__entry->tos = flp->flowi6_tos; __entry->tos = ip6_tclass(flp->flowlabel);
__entry->scope = flp->flowi6_scope; __entry->scope = flp->flowi6_scope;
__entry->flags = flp->flowi6_flags; __entry->flags = flp->flowi6_flags;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment