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:47 +0200
commitab7f305898f713b50996f29048d9568f80f37d88 (patch)
tree65827801563e6415a3d013c622ec013f46f53bd1
parent4b5c55cf784dd85308efd1165574b6fa9bfcb3ad (diff)
downloadopenvswitch-ab7f305898f713b50996f29048d9568f80f37d88.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 26beefcf4..1c5e095a6 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 b53e279a9..a056cd502 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 9a67d2ddc..4aa9a364d 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