aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2016-03-18 13:37:59 -0400
committerDavid S. Miller <davem@davemloft.net>2016-03-20 13:44:34 -0400
commit69716a2b51aeb68fe295c0d09e26c8781eacebde (patch)
treedea003dce3acd0e36e5a248b49fd159a8c76845f
parent95caf6f71a9998b5382e3fb9abbca34c02e8f74f (diff)
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: b811580d91e9 ("net: IPv6 fib lookup tracepoint") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/flow.h2
-rw-r--r--include/trace/events/fib6.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/net/flow.h b/include/net/flow.h
index 83969eebebf3..d47ef4bb5423 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -127,7 +127,6 @@ struct flowi6 {
127#define flowi6_oif __fl_common.flowic_oif 127#define flowi6_oif __fl_common.flowic_oif
128#define flowi6_iif __fl_common.flowic_iif 128#define flowi6_iif __fl_common.flowic_iif
129#define flowi6_mark __fl_common.flowic_mark 129#define flowi6_mark __fl_common.flowic_mark
130#define flowi6_tos __fl_common.flowic_tos
131#define flowi6_scope __fl_common.flowic_scope 130#define flowi6_scope __fl_common.flowic_scope
132#define flowi6_proto __fl_common.flowic_proto 131#define flowi6_proto __fl_common.flowic_proto
133#define flowi6_flags __fl_common.flowic_flags 132#define flowi6_flags __fl_common.flowic_flags
@@ -135,6 +134,7 @@ struct flowi6 {
135#define flowi6_tun_key __fl_common.flowic_tun_key 134#define flowi6_tun_key __fl_common.flowic_tun_key
136 struct in6_addr daddr; 135 struct in6_addr daddr;
137 struct in6_addr saddr; 136 struct in6_addr saddr;
137 /* Note: flowi6_tos is encoded in flowlabel, too. */
138 __be32 flowlabel; 138 __be32 flowlabel;
139 union flowi_uli uli; 139 union flowi_uli uli;
140#define fl6_sport uli.ports.sport 140#define fl6_sport uli.ports.sport
diff --git a/include/trace/events/fib6.h b/include/trace/events/fib6.h
index 4cf6bac4686d..d60096cddb2a 100644
--- a/include/trace/events/fib6.h
+++ b/include/trace/events/fib6.h
@@ -37,7 +37,7 @@ TRACE_EVENT(fib6_table_lookup,
37 __entry->tb_id = tb_id; 37 __entry->tb_id = tb_id;
38 __entry->oif = flp->flowi6_oif; 38 __entry->oif = flp->flowi6_oif;
39 __entry->iif = flp->flowi6_iif; 39 __entry->iif = flp->flowi6_iif;
40 __entry->tos = flp->flowi6_tos; 40 __entry->tos = ip6_tclass(flp->flowlabel);
41 __entry->scope = flp->flowi6_scope; 41 __entry->scope = flp->flowi6_scope;
42 __entry->flags = flp->flowi6_flags; 42 __entry->flags = flp->flowi6_flags;
43 43