]> www.infradead.org Git - users/hch/configfs.git/commit
selftests: net: Use the provided dpctl rather than the vswitchd for tests.
authorAaron Conole <aconole@redhat.com>
Tue, 25 Jun 2024 17:22:44 +0000 (13:22 -0400)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jun 2024 22:44:07 +0000 (15:44 -0700)
commitb7ce46fc614d4d31d438878ade1e4d0c3ef890c7
tree94b733f26c3c214cfa309a4d07c64b9a7ff13763
parent51458e1084d0f3938a5b96e5d85974d9c5ee1f21
selftests: net: Use the provided dpctl rather than the vswitchd for tests.

The current pmtu test infrastucture requires an installed copy of the
ovs-vswitchd userspace.  This means that any automated or constrained
environments may not have the requisite tools to run the tests.  However,
the pmtu tests don't require any special classifier processing.  Indeed
they are only using the vswitchd in the most basic mode - as a NORMAL
switch.

However, the ovs-dpctl kernel utility can now program all the needed basic
flows to allow traffic to traverse the tunnels and provide support for at
least testing some basic pmtu scenarios.  More complicated flow pipelines
can be added to the internal ovs test infrastructure, but that is work for
the future.  For now, enable the most common cases - wide mega flows with
no other prerequisites.

Enhance the pmtu testing to try testing using the internal utility, first.
As a fallback, if the internal utility isn't running, then try with the
ovs-vswitchd userspace tools.

Additionally, make sure that when the pyroute2 package is not available
the ovs-dpctl utility will error out to properly signal an error has
occurred and skip using the internal utility.

Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240625172245.233874-7-aconole@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/openvswitch/ovs-dpctl.py
tools/testing/selftests/net/pmtu.sh