From: Daniel Borkmann <daniel@iogearbox.net> Date: 2016-03-18 17:38:18
This set is a follow-up to address Jiri's recent feedback [1] on
the flowi6_tos issue, that it is not used for IPv6 route lookups.
The three patches fix all current users of flowi6_tos and remove
the define to avoid any future confusion on this. Tested the vxlan
and geneve ones with IPv6 routing rules. For details, please see
individual patches.
[ As fixes are currently applied against net-next tree, I've rebased
it against that. ]
Thanks!
[1] http://patchwork.ozlabs.org/patch/592055/
Daniel Borkmann (3):
vxlan: fix populating tclass in vxlan6_get_route
geneve: fix populating tclass in geneve_get_v6_dst
ipv6, trace: fix tos reporting on fib6_table_lookup
drivers/net/geneve.c | 11 ++++++-----
drivers/net/vxlan.c | 3 +--
include/net/flow.h | 2 +-
include/net/ipv6.h | 6 ++++++
include/trace/events/fib6.h | 2 +-
5 files changed, 15 insertions(+), 9 deletions(-)
--
1.9.3
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2016-03-18 17:38:18
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>
---
include/net/flow.h | 2 +-
include/trace/events/fib6.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2016-03-18 17:38:18
Jiri mentioned that flowi6_tos of struct flowi6 is never used/read
anywhere. In fact, rest of the kernel uses the flowi6's flowlabel,
where the traffic class _and_ the flowlabel (aka flowinfo) is encoded.
For example, for policy routing, fib6_rule_match() uses ip6_tclass()
that is applied on the flowlabel member for matching on tclass. Similar
fix is needed for geneve, where flowi6_tos is set as well. Installing
a v6 blackhole rule that f.e. matches on tos is now working with vxlan.
Fixes: 1400615d64cf ("vxlan: allow setting ipv6 traffic class")
Reported-by: Jiri Benc <redacted>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
drivers/net/vxlan.c | 3 +--
include/net/ipv6.h | 6 ++++++
2 files changed, 7 insertions(+), 2 deletions(-)
From: Daniel Borkmann <daniel@iogearbox.net> Date: 2016-03-18 17:38:18
The struct flowi6's flowi6_tos is not used in IPv6 route lookup, the
traffic class information is handled in the flowi6's flowlabel member
instead. For example, for policy routing, fib6_rule_match() uses
ip6_tclass() that is applied on the flowlabel for matching on tclass,
which would currently not work as expected.
Fixes: 3a56f86f1be6 ("geneve: handle ipv6 priority like ipv4 tos")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
drivers/net/geneve.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2016-03-20 17:44:53
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Fri, 18 Mar 2016 18:37:56 +0100
This set is a follow-up to address Jiri's recent feedback [1] on
the flowi6_tos issue, that it is not used for IPv6 route lookups.
The three patches fix all current users of flowi6_tos and remove
the define to avoid any future confusion on this. Tested the vxlan
and geneve ones with IPv6 routing rules. For details, please see
individual patches.
[ As fixes are currently applied against net-next tree, I've rebased
it against that. ]
Thanks!
[1] http://patchwork.ozlabs.org/patch/592055/