]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: openvswitch: add tests for tunnel vport refcounting
authorIlya Maximets <i.maximets@ovn.org>
Thu, 30 Apr 2026 23:38:38 +0000 (01:38 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 May 2026 13:19:37 +0000 (15:19 +0200)
commit05416ada37aa4efe93f25b0532f551d424fb7b3d
treeaa741e3d2c913a2e2540794d23816d26ac10d420
parentaa69918bd418e700309fdd08509dba324fb24296
selftests: openvswitch: add tests for tunnel vport refcounting

There were a few issues found with the tunnel vport types around the
vport destruction code.  Add some basic tests, so at least we know that
they can be properly added and removed without obvious issues.

The test creates OVS datapath, adds a non-LWT tunnel port, makes sure
they are created, and then removes the datapath and waits for all the
ports to be gone.

The dpctl script had a few bugs in the none-lwt tunnel creation code,
so fixing them as well to make the testing possible:
- The type of the --lwt option changed in order to properly disable it.
- Removed byte order conversion for the port numbers, as the value
  supposed to be in the host order.
- Added missing 'gre' choice for the tunnel type.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20260430233848.440994-3-i.maximets@ovn.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/openvswitch/openvswitch.sh
tools/testing/selftests/net/openvswitch/ovs-dpctl.py