On 9 Feb 2026, at 14:29, Eli Britstein wrote:
> Introduce a new netdev type - netdev-doca.
> In order to compile, need to install doca on the build machine.
Hi Eli,
I got some time to play with the patchset, and created a DOCA offload testsuite
like I did for DPDK (rte_flow) offload.
Of course there is no actual offload yet, but at least all the normal system
tests should be passing. Unfortunately, three tests are not passing, all
related to IPv6 tunnels. Can you take a look and make sure they are fixed in
the next revision? The tests are:
- 16: datapath - ping over vxlan6 tunnel FAILED (system-traffic.at:548)
- 19: datapath - ping over ip6gre L2 tunnel FAILED (system-traffic.at:753)
- 27: datapath - ping over geneve6 tunnel FAILED (system-traffic.at:1132)
In addition, I think it would be good to add a log message when a DOCA VF is
added without a corresponding PF (needed for switchdev).
The patch that adds the test framework is below, feel free to add it to your
next revision of the series.
Cheers,
Eelco
========<patch>=======
>From e500f613f3001c255910abb55da2d3d08511eefd Mon Sep 17 00:00:00 2001
From: Eelco Chaudron <[email protected]>
Date: Wed, 18 Mar 2026 11:07:08 +0100
Subject: [PATCH] tests: Add a simple DOCA test framework.
This patch adds userspace with DOCA offload unit tests.
It can be run with the 'make check-doca-offloads'
command; however, it requires a list of VFs that can be
used for offloaded ports. More details on how to set this
up can be found in the testing.rst file.
Signed-off-by: Eelco Chaudron <[email protected]>
---
NOTE: The following tests are failing and need investigation
from the DOCA side:
- 16: datapath - ping over vxlan6 tunnel FAILED (system-traffic.at:548)
- 19: datapath - ping over ip6gre L2 tunnel FAILED (system-traffic.at:753)
- 27: datapath - ping over geneve6 tunnel FAILED (system-traffic.at:1132)
---
Documentation/topics/testing.rst | 23 +++
tests/.gitignore | 3 +
tests/automake.mk | 23 +++
tests/ofproto-macros.at | 1 +
tests/system-doca-offloads-macros.at | 205 ++++++++++++++++++++++++
tests/system-doca-offloads-testsuite.at | 29 ++++
tests/system-doca-offloads.at | 104 ++++++++++++
tests/system-traffic.at | 24 +--
8 files changed, 400 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 deb6088d7ed..15b0b81e369 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
++++++++++++++++++++++++++++
@@ -320,6 +322,27 @@ To invoke the dpdk offloads testsuite with the userspace
datapath, run::
make check-dpdk-offloads \
OVS_DPDK_VF_PCI_ADDRS="0000:17:00.0,0 0000:17:00.0,1 0000:17:00.0,2
0000:17:00.0,3 0000:17:00.0,4 0000:17:00.0,5"
+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 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 b76025d9a2a..597c83a7fe9 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 f61e6686628..74115b8d9af 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 7f6ab890445..8740200710f 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 00000000000..92524e186c1
--- /dev/null
+++ b/tests/system-doca-offloads-macros.at
@@ -0,0 +1,205 @@
+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_doca_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_doca_get_vf_netdev $PORT_NO)
+ REP=$(ovs_doca_get_representor_netdev $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 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($@)])
+
+OVS_START_SHELL_HELPERS
+
+# ovs_doca_get_vf_netdev(<VF_INDEX>)
+#
+# This function tries to find the VF's netdev for the given PF's VF index.
+#
+ovs_doca_get_vf_netdev() {
+ PF_PCI=$(basename $(readlink /sys/class/net/$OVS_DOCA_PF_PORT/device))
+ VF_IDX=$1
+
+ vf_net_dir="/sys/bus/pci/devices/$PF_PCI/virtfn$VF_IDX/net"
+ if test ! -d "$vf_net_dir"; then
+ return 1
+ fi
+
+ vf_name=$(ls "$vf_net_dir" 2>/dev/null | head -1)
+ if test -z "$vf_name"; then
+ return 2
+ fi
+
+ echo "$vf_name"
+ return 0
+}
+
+# ovs_doca_get_representor_netdev(<VF_INDEX>)
+#
+# This function tries to find the representor's netdev for the given PF's VF
+# index.
+#
+ovs_doca_get_representor_netdev() {
+ PF_PCI=$(basename $(readlink /sys/class/net/$OVS_DOCA_PF_PORT/device))
+ VF_IDX=$1
+
+ representor=$(grep -l "vf$VF_IDX$" \
+ /sys/bus/pci/devices/$PF_PCI/net/*/phys_port_name \
+ 2>/dev/null | head -1)
+ if test -z "$representor"; then
+ return 2
+ fi
+
+ basename $(dirname "$representor")
+ return 0
+}
+
+# ovs_doca_verify_pf_cfg()
+#
+# Verify that the given PF port exists and that the required VFs are properly
+# configured, i.e. have representor ports.
+#
+ovs_doca_verify_pf_cfg() {
+ test -d "/sys/class/net/$OVS_DOCA_PF_PORT" || return 1
+
+ PF_PCI=$(basename $(readlink /sys/class/net/$OVS_DOCA_PF_PORT/device))
+ VF_NAMES=()
+ REPRESENTOR_NAMES=()
+
+ for i in {0..5}; do
+ # Get VF netdev using PCI path
+ vf_net_dir="/sys/bus/pci/devices/$PF_PCI/virtfn$i/net"
+ if test ! -d "$vf_net_dir"; then
+ return 1
+ fi
+
+ vf_name=$(ls "$vf_net_dir" 2>/dev/null | head -1)
+ if test -z "$vf_name"; then
+ return 2
+ fi
+ VF_NAMES+=($vf_name)
+
+ # Find representor port for this VF
+ representor=$(grep -l "vf$i$" \
+ /sys/bus/pci/devices/$PF_PCI/net/*/phys_port_name \
+ 2>/dev/null | head -1)
+ if test -z "$representor"; then
+ return 3
+ fi
+ REPRESENTOR_NAMES+=($(basename $(dirname "$representor")))
+ done
+
+ if test "${#VF_NAMES[*]}" -lt 6 -o "${#REPRESENTOR_NAMES[*]}" -lt 6; then
+ return 4
+ fi
+
+ return 0
+}
+
+OVS_END_SHELL_HELPERS
diff --git a/tests/system-doca-offloads-testsuite.at
b/tests/system-doca-offloads-testsuite.at
new file mode 100644
index 00000000000..0f3d8507bbc
--- /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 00000000000..0b579a58c08
--- /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 8f4fdf8b1d2..4faa63aef59 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
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev