mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 09:58:01 +00:00
tests: Include working system-traffic tests into the system-offloads-testsuite.
Include and run the system-traffic.at tests as part of the system offload testsuite. Exclude all the tests that will not run without any special modifications. Lowered log level for "recirc_id sharing not supported" message, so tests will not fail with older kernels. This is not an error level message, but should be debug, like all other, EOPNOTSUPP, related log messages. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Tested-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
parent
5dfc8309d9
commit
f68e757ef1
@ -2417,7 +2417,7 @@ netdev_tc_flow_put(struct netdev *netdev, struct match *match,
|
||||
}
|
||||
|
||||
if ((chain || recirc_act) && !info->recirc_id_shared_with_tc) {
|
||||
VLOG_ERR_RL(&error_rl, "flow_put: recirc_id sharing not supported");
|
||||
VLOG_DBG_RL(&rl, "flow_put: recirc_id sharing not supported");
|
||||
return EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,8 @@ SYSTEM_TESTSUITE_AT = \
|
||||
SYSTEM_OFFLOADS_TESTSUITE_AT = \
|
||||
tests/system-common-macros.at \
|
||||
tests/system-offloads-traffic.at \
|
||||
tests/system-offloads-testsuite.at
|
||||
tests/system-offloads-testsuite.at \
|
||||
tests/system-offloads-testsuite-macros.at
|
||||
|
||||
SYSTEM_DPDK_TESTSUITE_AT = \
|
||||
tests/system-common-macros.at \
|
||||
|
@ -224,3 +224,8 @@ m4_define([VSCTL_ADD_DATAPATH_TABLE],
|
||||
# or necessary for the userspace datapath as it is checking for a kernel
|
||||
# specific regression.
|
||||
m4_define([CHECK_L3L4_CONNTRACK_REASM])
|
||||
|
||||
# CHECK_NO_TC_OFFLOAD
|
||||
#
|
||||
# The kernel module tests do not use TC offload.
|
||||
m4_define([CHECK_NO_TC_OFFLOAD])
|
||||
|
36
tests/system-offloads-testsuite-macros.at
Normal file
36
tests/system-offloads-testsuite-macros.at
Normal file
@ -0,0 +1,36 @@
|
||||
AT_COPYRIGHT([Copyright (c) 2022 Red Hat, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at:
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.])
|
||||
|
||||
# The goal is to run as many as possible of the system-traffic tests with
|
||||
# OVS tc offload enabled. We do this by overriding the
|
||||
# OVS_TRAFFIC_VSWITCHD_START() with offloading enabled.
|
||||
m4_define([OVS_TRAFFIC_VSWITCHD_START],
|
||||
[AT_CHECK([modprobe openvswitch])
|
||||
on_exit 'modprobe -r openvswitch'
|
||||
m4_foreach([mod], [[vport_geneve], [vport_gre], [vport_lisp], [vport_stt], [vport_vxlan]],
|
||||
[modprobe -q mod || echo "Module mod not loaded."
|
||||
on_exit 'modprobe -q -r mod'
|
||||
])
|
||||
on_exit 'ovs-dpctl del-dp ovs-system'
|
||||
on_exit 'ovs-appctl dpctl/flush-conntrack'
|
||||
_OVS_VSWITCHD_START([], [-- set Open_vSwitch . other_config:hw-offload=true $3])
|
||||
dnl Add bridges, ports, etc.
|
||||
AT_CHECK([ovs-vsctl -- _ADD_BR([br0]) -- $1 m4_if([$2], [], [], [| uuidfilt])], [0], [$2])
|
||||
])
|
||||
|
||||
# Macro to exclude tests that will fail with TC offload enabled.
|
||||
m4_define([CHECK_NO_TC_OFFLOAD],
|
||||
[
|
||||
AT_SKIP_IF([:])
|
||||
])
|
@ -23,3 +23,6 @@ m4_include([tests/system-common-macros.at])
|
||||
m4_include([tests/system-kmod-macros.at])
|
||||
|
||||
m4_include([tests/system-offloads-traffic.at])
|
||||
|
||||
m4_include([tests/system-offloads-testsuite-macros.at])
|
||||
m4_include([tests/system-traffic.at])
|
||||
|
@ -1199,6 +1199,7 @@ OVS_TRAFFIC_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([datapath - mpls actions])
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])])
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -1236,6 +1237,7 @@ OVS_TRAFFIC_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([datapath - multiple mpls label pop])
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START([_ADD_BR([br1])])
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -1638,6 +1640,7 @@ dnl br-underlay: with IP: 172.31.1.100
|
||||
dnl ns0: connect to br-underlay, with IP: 10.1.1.1
|
||||
AT_SETUP([datapath - truncate and output to gre tunnel by simulated packets])
|
||||
OVS_CHECK_MIN_KERNEL(3, 10)
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
AT_SKIP_IF([test $HAVE_NC = no])
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -1772,6 +1775,7 @@ AT_SETUP([datapath - truncate and output to gre tunnel])
|
||||
AT_SKIP_IF([test $HAVE_NC = no])
|
||||
OVS_CHECK_KERNEL_EXCL(3, 10, 4, 15)
|
||||
OVS_CHECK_GRE()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_BR([br-underlay])
|
||||
@ -2919,6 +2923,7 @@ AT_CLEANUP
|
||||
|
||||
AT_SETUP([conntrack - zones from other field, more tests])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -3050,6 +3055,7 @@ AT_CLEANUP
|
||||
AT_SETUP([conntrack - multiple namespaces, internal ports])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_LOCAL_STACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START(
|
||||
[set-fail-mode br0 secure -- ])
|
||||
|
||||
@ -3672,6 +3678,7 @@ AT_CLEANUP
|
||||
|
||||
AT_SETUP([conntrack - IPv4 fragmentation + cvlan])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START([set Open_vSwitch . other_config:vlan-limit=0])
|
||||
OVS_CHECK_8021AD()
|
||||
|
||||
@ -4195,6 +4202,7 @@ AT_SETUP([conntrack - Fragmentation over vxlan])
|
||||
OVS_CHECK_VXLAN()
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_LOCAL_STACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
ADD_BR([br-underlay])
|
||||
@ -4385,6 +4393,7 @@ AT_CLEANUP
|
||||
AT_SETUP([conntrack - zone-based timeout policy])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_TIMEOUT()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -4878,6 +4887,7 @@ OVS_TRAFFIC_VSWITCHD_STOP
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([conntrack - FTP])
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
@ -4987,6 +4997,7 @@ AT_SETUP([conntrack - FTP over IPv6])
|
||||
AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -5042,6 +5053,7 @@ AT_SETUP([conntrack - IPv6 FTP Passive])
|
||||
AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -5101,6 +5113,7 @@ AT_SETUP([conntrack - FTP with multiple expectations])
|
||||
AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -5167,6 +5180,7 @@ AT_SETUP([conntrack - TFTP])
|
||||
AT_SKIP_IF([test $HAVE_TFTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -5802,6 +5816,7 @@ m4_define([CHECK_FTP_NAT],
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6109,6 +6124,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6169,6 +6185,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6229,6 +6246,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6289,6 +6307,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6349,6 +6368,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6551,6 +6571,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6611,6 +6632,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -6672,6 +6694,7 @@ AT_SKIP_IF([test $HAVE_FTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
@ -6732,6 +6755,7 @@ AT_SKIP_IF([test $HAVE_TFTP = no])
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_CONNTRACK_NAT()
|
||||
CHECK_CONNTRACK_ALG()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
|
||||
@ -7106,6 +7130,7 @@ AT_SETUP([conntrack - Multiple ICMP traverse])
|
||||
dnl This tracks sending ICMP packets via conntrack multiple times for the
|
||||
dnl same packet
|
||||
CHECK_CONNTRACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
OVS_CHECK_CT_CLEAR()
|
||||
|
||||
@ -7148,6 +7173,7 @@ AT_CLEANUP
|
||||
|
||||
AT_SETUP([conntrack - can match and clear ct_state from outside OVS])
|
||||
CHECK_CONNTRACK_LOCAL_STACK()
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
OVS_CHECK_TUNNEL_TSO()
|
||||
OVS_CHECK_GENEVE()
|
||||
|
||||
@ -7196,6 +7222,7 @@ AT_CLEANUP
|
||||
AT_BANNER([IGMP])
|
||||
|
||||
AT_SETUP([IGMP - flood under normal action])
|
||||
CHECK_NO_TC_OFFLOAD()
|
||||
|
||||
OVS_TRAFFIC_VSWITCHD_START()
|
||||
ADD_NAMESPACES(at_ns0, at_ns1)
|
||||
|
@ -325,3 +325,8 @@ m4_define([CHECK_L3L4_CONNTRACK_REASM],
|
||||
[
|
||||
AT_SKIP_IF([:])
|
||||
])
|
||||
|
||||
# CHECK_NO_TC_OFFLOAD
|
||||
#
|
||||
# Userspace tests do not use TC offload.
|
||||
m4_define([CHECK_NO_TC_OFFLOAD])
|
||||
|
Loading…
x
Reference in New Issue
Block a user