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:45 +0200
commitda1f5a95cf09f7e73adc4ab655eb65084b6d6ffa (patch)
tree6caa25ff9fa22c3f5ff1c12cfd789bd5a70f45a9
parente7792039e6db23b733f73c29672e0409ed0bc3df (diff)
downloadopenvswitch-da1f5a95cf09f7e73adc4ab655eb65084b6d6ffa.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 a24d59ef1..9363f1ef5 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 f639ba53a..da3a4caca 100644
--- a/tests/system-userspace-macros.at
+++ b/tests/system-userspace-macros.at
@@ -299,6 +299,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