summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@ovn.org>2022-08-05 13:17:08 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-08-08 12:38:46 +0200
commit8ec1752be7a12e3186fad358805e38c7530a3d69 (patch)
tree758f9303d671c96decc08e9135ec314b1472993e
parent8c0a187ea5a0291242cf282788405e30806ca290 (diff)
downloadopenvswitch-8ec1752be7a12e3186fad358805e38c7530a3d69.tar.gz
system-traffic: Don't run IPv6 header modification test on kernels < 5.19.
OVS kernel module is incorrectly updating checksums while changing IPv6 fields of later fragments that doesn't really have L4 headers. This makes the 'ping6 between two ports with header modify' test fail on most of the distribution kernels. The issue got indirectly fixed in latest 5.19 with commit: 12378a5a75e3 ("net: openvswitch: fix parsing of nw_proto for IPv6 fragments") The reason is that set_ipv6() function in net/openvswitch/actions.c is using the protocol number from the parsed flow key and not from the packet itself, and nw_proto=44 is not a protocol where we can update the checksum. It was backported to all supported upstream stable trees, but didn't find its way to most of the distributions yet. Restricting the test to 5.19+ kernels to avoid failures on distro kernels. Additionally allowing the previous test for later fragments to be executed in userspace testsuite. Fixes: 2ff43c78c685 ("packets: Re-calculate IPv6 checksum only for first frag upon modify.") Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--tests/system-kmod-macros.at7
-rw-r--r--tests/system-traffic.at1
-rw-r--r--tests/system-userspace-macros.at5
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
index 86d633ac4..f0aaae63e 100644
--- a/tests/system-kmod-macros.at
+++ b/tests/system-kmod-macros.at
@@ -200,6 +200,13 @@ m4_define([OVS_CHECK_KERNEL_EXCL],
AT_SKIP_IF([ ! ( test $version -lt $1 || ( test $version -eq $1 && test $sublevel -lt $2 ) || test $version -gt $3 || ( test $version -eq $3 && test $sublevel -gt $4 ) ) ])
])
+# CHECK_LATER_IPV6_FRAGMENTS()
+#
+# Upstream kernels beetween 4.20 and 5.19 are not parsing IPv6 fragments
+# correctly. The issue was also backported in some older distribution
+# kernels, so kernels below 4.20 are not reliable.
+m4_define([CHECK_LATER_IPV6_FRAGMENTS], [OVS_CHECK_MIN_KERNEL(5, 19)])
+
# VSCTL_ADD_DATAPATH_TABLE()
#
# Create system datapath table "system" for kernel tests in ovsdb
diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index fd3f13f25..353fa4c31 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -194,6 +194,7 @@ AT_CLEANUP
AT_SETUP([datapath - ping6 between two ports with header modify])
OVS_TRAFFIC_VSWITCHD_START()
+CHECK_LATER_IPV6_FRAGMENTS()
AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
diff --git a/tests/system-userspace-macros.at b/tests/system-userspace-macros.at
index 9f0d38dfb..38e00b201 100644
--- a/tests/system-userspace-macros.at
+++ b/tests/system-userspace-macros.at
@@ -301,6 +301,11 @@ m4_define([OVS_CHECK_KERNEL_EXCL],
AT_SKIP_IF([:])
])
+# CHECK_LATER_IPV6_FRAGMENTS()
+#
+# Userspace is parsing later IPv6 fragments correctly.
+m4_define([CHECK_LATER_IPV6_FRAGMENTS], [])
+
# VSCTL_ADD_DATAPATH_TABLE()
#
# Create datapath table "netdev" for userspace tests in ovsdb