This patch adds userspace DOCA offload unit tests. They can be run with the 'make check-doca-offloads' command. More details on how to set this up can be found in the testing.rst file.
Signed-off-by: Eelco Chaudron <[email protected]> --- NOTE: This patch requires the netdev-doca series patch sent out earlier by Eli Britstein, and my 'tests: Rework DPDK offload tests to use a simpler interface argument' patch. --- Documentation/topics/testing.rst | 24 +++++ tests/.gitignore | 3 + tests/automake.mk | 23 +++++ tests/ofproto-macros.at | 1 + tests/system-doca-offloads-macros.at | 118 ++++++++++++++++++++++++ tests/system-doca-offloads-testsuite.at | 29 ++++++ tests/system-doca-offloads.at | 104 +++++++++++++++++++++ tests/system-traffic.at | 24 ++--- 8 files changed, 314 insertions(+), 12 deletions(-) create mode 100644 tests/system-doca-offloads-macros.at create mode 100644 tests/system-doca-offloads-testsuite.at create mode 100644 tests/system-doca-offloads.at diff --git a/Documentation/topics/testing.rst b/Documentation/topics/testing.rst index 019661b97..dbf6f8b90 100644 --- a/Documentation/topics/testing.rst +++ b/Documentation/topics/testing.rst @@ -262,6 +262,8 @@ The results of the testsuite are in ``tests/system-userspace-testsuite.dir``. All the features documented under `Unit Tests`_ are available for the userspace datapath testsuite. +.. _userspace-datapath-dpdk: + Userspace datapath with DPDK ++++++++++++++++++++++++++++ @@ -323,6 +325,28 @@ To invoke the DPDK offloads testsuite with the userspace datapath, run:: make check-dpdk-offloads OVS_DPDK_PF_PORT=ens2f0np0 +Userspace datapath with DOCA offload +++++++++++++++++++++++++++++++++++++ + +To invoke the userspace datapath tests with DOCA offload, +the same prerequisites apply as for :ref:`userspace-datapath-dpdk`. +In addition, six Virtual Function (VF) interfaces must be preconfigured on a +single Physical Function (PF) that supports DOCA hardware offload. + +This is an example on how to set this up for an NVIDIA blade on port +``ens2f0np0``:: + + OVS_DOCA_PF_PORT=ens2f0np0 + PF_PCI=$(basename $(readlink /sys/class/net/$OVS_DOCA_PF_PORT/device)) + echo 0 > /sys/bus/pci/devices/$PF_PCI/sriov_numvfs + devlink dev eswitch set pci/$PF_PCI mode switchdev + echo 6 > /sys/bus/pci/devices/$PF_PCI/sriov_numvfs + +This PF's interface name needs to be passed with the OVS_DOCA_PF_PORT variable. +To invoke the DOCA offloads testsuite with the userspace datapath, run:: + + make check-doca-offloads OVS_DOCA_PF_PORT=ens2f0np0 + Userspace datapath: Testing and Validation of CPU-specific Optimizations ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/tests/.gitignore b/tests/.gitignore index b76025d9a..597c83a7f 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -32,6 +32,9 @@ /system-offloads-testsuite /system-offloads-testsuite.dir/ /system-offloads-testsuite.log +/system-doca-offloads-testsuite +/system-doca-offloads-testsuite.dir/ +/system-doca-offloads-testsuite.log /system-dpdk-offloads-testsuite /system-dpdk-offloads-testsuite.dir/ /system-dpdk-offloads-testsuite.log diff --git a/tests/automake.mk b/tests/automake.mk index f61e66866..74115b8d9 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -7,6 +7,7 @@ EXTRA_DIST += \ $(SYSTEM_TSO_TESTSUITE_AT) \ $(SYSTEM_AFXDP_TESTSUITE_AT) \ $(SYSTEM_OFFLOADS_TESTSUITE_AT) \ + $(SYSTEM_DOCA_OFFLOADS_TESTSUITE_AT) \ $(SYSTEM_DPDK_OFFLOADS_TESTSUITE_AT) \ $(SYSTEM_DPDK_TESTSUITE_AT) \ $(OVSDB_CLUSTER_TESTSUITE_AT) \ @@ -16,6 +17,7 @@ EXTRA_DIST += \ $(SYSTEM_TSO_TESTSUITE) \ $(SYSTEM_AFXDP_TESTSUITE) \ $(SYSTEM_OFFLOADS_TESTSUITE) \ + $(SYSTEM_DOCA_OFFLOADS_TESTSUITE) \ $(SYSTEM_DPDK_OFFLOADS_TESTSUITE) \ $(SYSTEM_DPDK_TESTSUITE) \ $(OVSDB_CLUSTER_TESTSUITE) \ @@ -188,6 +190,12 @@ SYSTEM_OFFLOADS_TESTSUITE_AT = \ tests/system-offloads-testsuite.at \ tests/system-offloads-testsuite-macros.at +SYSTEM_DOCA_OFFLOADS_TESTSUITE_AT = \ + tests/system-common-macros.at \ + tests/system-doca-offloads.at \ + tests/system-doca-offloads-macros.at \ + tests/system-doca-offloads-testsuite.at + SYSTEM_DPDK_OFFLOADS_TESTSUITE_AT = \ tests/system-common-macros.at \ tests/system-dpdk-macros.at \ @@ -211,6 +219,7 @@ SYSTEM_USERSPACE_TESTSUITE = $(srcdir)/tests/system-userspace-testsuite SYSTEM_TSO_TESTSUITE = $(srcdir)/tests/system-tso-testsuite SYSTEM_AFXDP_TESTSUITE = $(srcdir)/tests/system-afxdp-testsuite SYSTEM_OFFLOADS_TESTSUITE = $(srcdir)/tests/system-offloads-testsuite +SYSTEM_DOCA_OFFLOADS_TESTSUITE = $(srcdir)/tests/system-doca-offloads-testsuite SYSTEM_DPDK_OFFLOADS_TESTSUITE = $(srcdir)/tests/system-dpdk-offloads-testsuite SYSTEM_DPDK_TESTSUITE = $(srcdir)/tests/system-dpdk-testsuite OVSDB_CLUSTER_TESTSUITE = $(srcdir)/tests/ovsdb-cluster-testsuite @@ -325,6 +334,12 @@ check-offloads-valgrind: all $(valgrind_wrappers) $(check_DATA) @echo '----------------------------------------------------------------------' @echo 'Valgrind output can be found in tests/system-offloads-testsuite.dir/*/valgrind.*' @echo '----------------------------------------------------------------------' +check-doca-offloads-valgrind: all $(valgrind_wrappers) $(check_DATA) + $(SHELL) '$(SYSTEM_DOCA_OFFLOADS_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1 + @echo + @echo '----------------------------------------------------------------------' + @echo 'Valgrind output can be found in tests/system-doca-offloads-testsuite.dir/*/valgrind.*' + @echo '----------------------------------------------------------------------' check-dpdk-offloads-valgrind: all $(valgrind_wrappers) $(check_DATA) $(SHELL) '$(SYSTEM_DPDK_OFFLOADS_TESTSUITE)' -C tests VALGRIND='$(VALGRIND)' AUTOTEST_PATH='tests/valgrind:$(AUTOTEST_PATH)' -d $(TESTSUITEFLAGS) -j1 @echo @@ -373,6 +388,10 @@ check-offloads: all set $(SHELL) '$(SYSTEM_OFFLOADS_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)'; \ "$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) +check-doca-offloads: all + set $(SHELL) '$(SYSTEM_DOCA_OFFLOADS_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)'; \ + "$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) + check-dpdk-offloads: all set $(SHELL) '$(SYSTEM_DPDK_OFFLOADS_TESTSUITE)' -C tests AUTOTEST_PATH='$(AUTOTEST_PATH)'; \ "$$@" $(TESTSUITEFLAGS) -j1 || (test X'$(RECHECK)' = Xyes && "$$@" --recheck) @@ -422,6 +441,10 @@ $(SYSTEM_OFFLOADS_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_OFFLOAD $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o [email protected] [email protected] $(AM_V_at)mv [email protected] $@ +$(SYSTEM_DOCA_OFFLOADS_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_DOCA_OFFLOADS_TESTSUITE_AT) $(COMMON_MACROS_AT) + $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o [email protected] [email protected] + $(AM_V_at)mv [email protected] $@ + $(SYSTEM_DPDK_OFFLOADS_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_DPDK_OFFLOADS_TESTSUITE_AT) $(COMMON_MACROS_AT) $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o [email protected] [email protected] $(AM_V_at)mv [email protected] $@ diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 7f6ab8904..874020071 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -228,6 +228,7 @@ m4_define([_OVS_VSWITCHD_START], /probe tc:/d /setting extended ack support failed/d /tc: Using policy/d +/DOCA Disabled - Use other_config:doca-init to enable/d /hw-offload-priority configuration has an unknown type;/d']]) ]) diff --git a/tests/system-doca-offloads-macros.at b/tests/system-doca-offloads-macros.at new file mode 100644 index 000000000..6954eb4a9 --- /dev/null +++ b/tests/system-doca-offloads-macros.at @@ -0,0 +1,118 @@ +AT_COPYRIGHT([Copyright (c) 2026 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.]) + +# We also skip any DPDK_OFFLOAD-skipped tests for the same reasons. +# For details, see the macro definition in the system-dpdk-offload.at file. +m4_define([CHECK_NO_DPDK_OFFLOAD], +[ + AT_SKIP_IF([:]) +]) + +# OVS_DOCA_OFFLOAD_PRE_CHECK() +# +# Check prerequisites for DOCA tests, i.e. make sure PF exists with the +# corresponding VFs. +# +m4_define([OVS_DOCA_OFFLOAD_PRE_CHECK], [ + OVS_DPDK_PRE_CHECK() + AT_SKIP_IF([test -z "$OVS_DOCA_PF_PORT"]) + + AT_SKIP_IF([! ovs_dpdk_verify_pf_cfg "$OVS_DOCA_PF_PORT"]) +]) + +# OVS_TRAFFIC_VSWITCHD_START([vsctl-args], [vsctl-output], [dbinit-aux-args]) +# +# This is a copy from system-dpdk-macro.at with the following changes: +# 1) Use OVS_DOCA_OFFLOAD_PRE_CHECK() instead of OVS_DPDK_PRE_CHECK(). +# 2) Start with minimal PCI allowlist (only allows dummy device 0000:00:00.0). +# 3) Enable DOCA and hardware offload. +# +m4_define([OVS_TRAFFIC_VSWITCHD_START], + [ + OVS_DOCA_OFFLOAD_PRE_CHECK() + OVS_WAIT_WHILE([ip link show ovs-netdev]) + OVS_DPDK_START([-a 0000:00:00.0], [--disable-system], + [-- set Open_vSwitch . other_config:doca-init=true dnl + -- set Open_vSwitch . other_config:hw-offload=true $3]) + dnl Add bridges, ports, etc. + OVS_WAIT_WHILE([ip link show br0]) + AT_CHECK([ovs-vsctl -- _ADD_BR([br0]) -- $1 m4_if([$2], [], [], + [| uuidfilt])], [0], [$2]) + AT_CHECK([ovs-vsctl -- _ADD_BR([brPF])]) + AT_CHECK([ovs-vsctl add-port brPF $OVS_DOCA_PF_PORT -- dnl + set interface $OVS_DOCA_PF_PORT type=doca]) +]) + +# OVS_TRAFFIC_VSWITCHD_STOP([ALLOWLIST], [extra_cmds]) +# +# This is a copy from system-dpdk-macro.at adding some doca offload specific +# error message exclusion. +# +m4_define([OVS_TRAFFIC_VSWITCHD_STOP], + [OVS_DPDK_STOP_VSWITCHD([dnl +$1";/mlx5_net: Failed to update link status: /d"]) + AT_CHECK([:; $2]) +]) + +# ADD_{VF|VETH}([port], [namespace], [ovs-br], [ip_addr] [mac_addr], [gateway], +# [ip_addr_flags]) +# +# Simulate the ADD_VETH() macro defined in system-common-macros.at, allowing +# us to run the existing system-traffic unit tests without any test-specific +# changes. This is consistent with how DPDK and AF_XDP run the system tests, +# except that we are not using actual veth devices, but VF representor ports. +# +m4_define([ADD_VF], + [ USER_PORT=$1 + case "$USER_PORT" in + client) PORT_NO=0 ;; + server) PORT_NO=1 ;; + *) PORT_NO=${USER_PORT##*[!0-9]} ;; + esac + + AT_CHECK([[[ "$PORT_NO" -ge 0 ]] && [[ "$PORT_NO" -le 5 ]] || return 66]) + + PF_PCI=$(basename $(readlink /sys/class/net/$OVS_DOCA_PF_PORT/device)) + VF=$(ovs_dpdk_get_vf_netdev $OVS_DOCA_PF_PORT $PORT_NO) + REP=$(ovs_dpdk_get_representor_netdev $OVS_DOCA_PF_PORT $PORT_NO) + AT_CHECK([test -n "$VF"]) + AT_CHECK([test -n "$REP"]) + + AT_CHECK([ip link set $REP name ovs-$1]) + AT_CHECK([ip link set $VF down]) + AT_CHECK([ip link set $VF name $1]) + AT_CHECK([ip link set $1 netns $2]) + AT_CHECK([ovs-vsctl add-port $3 ovs-$1 -- \ + set interface ovs-$1 external-ids:iface-id="$1" -- \ + set interface ovs-$1 type=doca]) + + NS_CHECK_EXEC([$2], [ip addr add $4 dev $1 $7]) + NS_CHECK_EXEC([$2], [ip link set dev $1 up]) + if test -n "$5"; then + NS_CHECK_EXEC([$2], [ip link set dev $1 address $5]) + else + NS_CHECK_EXEC([$2], + [ip link set dev $1 address 02:00:00:00:EC:0$PORT_NO]) + fi + if test -n "$6"; then + NS_CHECK_EXEC([$2], [ip route add default via $6]) + fi + on_exit "ip netns exec $2 ip link set $1 netns 1; \ + ip link property del dev $1 altname $VF; \ + ip link property del dev ovs-$1 altname $REP; \ + ip link set $1 name $VF; \ + ip link set ovs-$1 name $REP" + ] +) +m4_define([ADD_VETH], [ADD_VF($@)]) diff --git a/tests/system-doca-offloads-testsuite.at b/tests/system-doca-offloads-testsuite.at new file mode 100644 index 000000000..0f3d8507b --- /dev/null +++ b/tests/system-doca-offloads-testsuite.at @@ -0,0 +1,29 @@ +AT_INIT + +AT_COPYRIGHT([Copyright (c) 2026 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.]) + +m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS]) + +m4_include([tests/ovs-macros.at]) +m4_include([tests/ovsdb-macros.at]) +m4_include([tests/ofproto-macros.at]) +m4_include([tests/system-common-macros.at]) +m4_include([tests/system-userspace-macros.at]) +m4_include([tests/system-dpdk-macros.at]) +m4_include([tests/system-dpdk-offloads-macros.at]) +m4_include([tests/system-doca-offloads-macros.at]) + +m4_include([tests/system-doca-offloads.at]) +m4_include([tests/system-traffic.at]) diff --git a/tests/system-doca-offloads.at b/tests/system-doca-offloads.at new file mode 100644 index 000000000..0b579a58c --- /dev/null +++ b/tests/system-doca-offloads.at @@ -0,0 +1,104 @@ +AT_COPYRIGHT([Copyright (c) 2026 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.]) + +AT_BANNER([DOCA offload unit tests]) + +AT_SETUP([doca offload - ping between two hardware offloaded ports]) +OVS_DOCA_OFFLOAD_PRE_CHECK() +OVS_TRAFFIC_VSWITCHD_START() +AT_CHECK([ovs-appctl vlog/set netdev_doca:dbg]) + +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) +ADD_NAMESPACES(at_ns0, at_ns1) +ADD_VF(p0, at_ns0, br0, "10.1.1.1/24") +ADD_VF(p1, at_ns1, br0, "10.1.1.2/24") + +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -W 2 10.1.1.2 \ + | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + +# Once actual hardware offload is supported, type should be changed from 'ovs' +# to 'doca,offloaded'. +OVS_WAIT_UNTIL_EQUAL( + [ovs-appctl dpctl/dump-flows --names type=ovs \ + | DUMP_DP_IP_CLEAN_SORTED], [dnl +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0]) + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + +AT_SETUP([doca offload - ping between six hardware offloaded ports]) +OVS_DOCA_OFFLOAD_PRE_CHECK() +OVS_TRAFFIC_VSWITCHD_START() + +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) +AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:max-idle=20000]) +ADD_NAMESPACES(at_ns0, at_ns1, at_ns2, at_ns3, at_ns4, at_ns5) +ADD_VF(p0, at_ns0, br0, "10.1.1.1/24") +ADD_VF(p1, at_ns1, br0, "10.1.1.2/24") +ADD_VF(p2, at_ns2, br0, "10.1.1.3/24") +ADD_VF(p3, at_ns3, br0, "10.1.1.4/24") +ADD_VF(p4, at_ns4, br0, "10.1.1.5/24") +ADD_VF(p5, at_ns5, br0, "10.1.1.6/24") + +for NS in $(seq 0 5); do + START=$((NS + 2)) + for IP in $(seq "$START" 6); do + NS_CHECK_EXEC([at_ns$NS], [ping -q -c 3 -i 0.3 -W 2 10.1.1.$IP \ + | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + done +done + +# Once actual hardware offload is supported, type should be changed from 'ovs' +# to 'doca,offloaded'. +OVS_WAIT_UNTIL_EQUAL( + [ovs-appctl dpctl/dump-flows --names type=ovs \ + | DUMP_DP_IP_CLEAN_SORTED], [dnl +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p2 +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p3 +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p4 +in_port(ovs-p0),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p5 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p2 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p3 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p4 +in_port(ovs-p1),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p5 +in_port(ovs-p2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0 +in_port(ovs-p2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p3 +in_port(ovs-p2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p4 +in_port(ovs-p2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p5 +in_port(ovs-p3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0 +in_port(ovs-p3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p2 +in_port(ovs-p3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p4 +in_port(ovs-p3),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p5 +in_port(ovs-p4),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0 +in_port(ovs-p4),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p4),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p2 +in_port(ovs-p4),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p3 +in_port(ovs-p4),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p5 +in_port(ovs-p5),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p0 +in_port(ovs-p5),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p1 +in_port(ovs-p5),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p2 +in_port(ovs-p5),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p3 +in_port(ovs-p5),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:196, used:0.0s, actions:ovs-p4]) + +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 8f4fdf8b1..4faa63aef 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -2207,9 +2207,9 @@ dnl SLOW_ACTION test1: check datapatch actions AT_CHECK([ovs-ofctl del-flows br0]) AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) -AT_CHECK([ovs-appctl ofproto/trace br0 "in_port=1,dl_type=0x800,dl_src=e6:66:c1:11:11:11,dl_dst=e6:66:c1:22:22:22,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,tp_src=8,tp_dst=9"], [0], [stdout]) +AT_CHECK([ovs-appctl ofproto/trace --names br0 "in_port=1,dl_type=0x800,dl_src=e6:66:c1:11:11:11,dl_dst=e6:66:c1:22:22:22,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=6,tp_src=8,tp_dst=9"], [0], [stdout]) AT_CHECK([tail -3 stdout], [0], -[Datapath actions: trunc(100),3,5,trunc(100),3,trunc(100),5,3,trunc(200),5,trunc(65535),3 +[Datapath actions: trunc(100),ovs-p1,ovs-p2,trunc(100),ovs-p1,trunc(100),ovs-p2,ovs-p1,trunc(200),ovs-p2,trunc(65535),ovs-p1 This flow is handled by the userspace slow path because it: - Uses action(s) not supported by datapath. ]) @@ -2548,10 +2548,10 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt]) dnl Generate some traffic. NS_CHECK_EXEC([at_ns0], [ping -q -c 10 -i 0.1 -w 2 10.1.1.2], [1], [ignore]) -OVS_WAIT_UNTIL_EQUAL([ovs-appctl dpctl/dump-flows | grep "eth_type(0x0800)" | dnl - strip_ptype | strip_eth | strip_recirc | strip_stats | dnl - strip_used | sort], [dnl -recirc_id(<recirc>),in_port(2),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:0.0s, actions:drop]) +OVS_WAIT_UNTIL_EQUAL([ovs-appctl dpctl/dump-flows --names | dnl + grep "eth_type(0x0800)" | strip_ptype | strip_eth | dnl + strip_recirc | strip_stats | strip_used | sort], [dnl +recirc_id(<recirc>),in_port(ovs-p0),eth_type(0x0800),ipv4(frag=no), packets:0, bytes:0, used:0.0s, actions:drop]) OVS_TRAFFIC_VSWITCHD_STOP(["/WARN/d"]) AT_CLEANUP @@ -2703,11 +2703,11 @@ NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \ $(ovs-ofctl compose-packet --bare 'ND_NS_PKT,nd_target=2001::1:0:392')], [0], [ignore]) -AT_CHECK([ovs-appctl dpctl/dump-flows | strip_stats | strip_used | dnl +AT_CHECK([ovs-appctl dpctl/dump-flows --names | strip_stats | strip_used | dnl strip_key32 | strip_ptype | strip_eth | strip_recirc | dnl grep ",nd" | sort], [0], [dnl -recirc_id(<recirc>),in_port(2),eth(src=36:b1:ee:7c:01:03,dst=36:b1:ee:7c:01:02),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=2001::1:0:392), packets:0, bytes:0, used:never, actions:1,3 -recirc_id(<recirc>),in_port(2),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=3000::1), packets:0, bytes:0, used:never, actions:drop +recirc_id(<recirc>),in_port(ovs-p0),eth(src=36:b1:ee:7c:01:03,dst=36:b1:ee:7c:01:02),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=2001::1:0:392), packets:0, bytes:0, used:never, actions:br0,ovs-p1 +recirc_id(<recirc>),in_port(ovs-p0),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=3000::1), packets:0, bytes:0, used:never, actions:drop ]) OVS_WAIT_UNTIL([ovs-appctl dpctl/dump-flows | grep ",nd" | wc -l | grep -E ^0]) @@ -2722,11 +2722,11 @@ NS_CHECK_EXEC([at_ns0], [$PYTHON3 $srcdir/sendpkt.py p0 \ $(ovs-ofctl compose-packet --bare 'ND_NS_PKT,nd_target=3000::1')], [0], [ignore]) -AT_CHECK([ovs-appctl dpctl/dump-flows | strip_stats | strip_used | dnl +AT_CHECK([ovs-appctl dpctl/dump-flows --names | strip_stats | strip_used | dnl strip_key32 | strip_ptype | strip_eth | strip_recirc | dnl grep ",nd" | sort], [0], [dnl -recirc_id(<recirc>),in_port(2),eth(src=36:b1:ee:7c:01:03,dst=36:b1:ee:7c:01:02),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=2001::1:0:392), packets:0, bytes:0, used:never, actions:1,3 -recirc_id(<recirc>),in_port(2),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=3000::1), packets:0, bytes:0, used:never, actions:drop +recirc_id(<recirc>),in_port(ovs-p0),eth(src=36:b1:ee:7c:01:03,dst=36:b1:ee:7c:01:02),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=2001::1:0:392), packets:0, bytes:0, used:never, actions:br0,ovs-p1 +recirc_id(<recirc>),in_port(ovs-p0),eth_type(0x86dd),ipv6(proto=58,frag=no),icmpv6(type=136),nd(target=3000::1), packets:0, bytes:0, used:never, actions:drop ]) OVS_TRAFFIC_VSWITCHD_STOP -- 2.47.3 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
