From: Minxi Hou <houminxi@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org, dev@openvswitch.org,
Minxi Hou <houminxi@gmail.com>
Subject: [PATCH net-next 0/2] selftests: openvswitch: add pop_vlan test
Date: Fri, 1 May 2026 20:27:54 +0800 [thread overview]
Message-ID: <20260501122756.3081754-1-houminxi@gmail.com> (raw)
This series extends the ovs-dpctl.py flow parser to support vlan() and
encap() match strings, then adds a test for the OVS datapath POP_VLAN
action.
The ovs-dpctl.py flow parser currently cannot express VLAN-tagged flow
matches. The kernel unconditionally forces an exact match on VLAN TCI
when parsing flow keys, and requires both OVS_KEY_ATTR_VLAN and
OVS_KEY_ATTR_ENCAP for VLAN frame validation. Without vlan()/encap()
parsing, no VLAN flow match is possible from ovs-dpctl.py.
Patch 1 fixes two pre-existing nla_map type bugs: OVS_KEY_ATTR_VLAN
was mapped to "uint16" instead of the correct big-endian "be16", and
OVS_KEY_ATTR_ENCAP was mapped to "none" instead of "nested". It then
adds the vlan() and encap() flow string parsers, dpstr() display
support, and proper ovskey instance returns for encap.
Patch 2 adds a test that uses kernel VLAN sub-interfaces to generate
802.1Q tagged frames and verifies pop_vlan via pcap at the egress
veth. A negative check confirms tagged frames arrive intact without
pop_vlan, then the positive check confirms the tag is stripped.
No regression in the existing OVS selftests.
Signed-off-by: Minxi Hou <houminxi@gmail.com>
Minxi Hou (2):
selftests: openvswitch: add vlan() and encap() flow string parsing
selftests: openvswitch: add pop_vlan test
.../selftests/net/openvswitch/openvswitch.sh | 132 ++++++++++++
.../selftests/net/openvswitch/ovs-dpctl.py | 190 +++++++++++++++++-
2 files changed, 320 insertions(+), 2 deletions(-)
base-commit: 4baf2415992e3051cb39b831191d12cb7e85ab60
--
2.53.0
next reply other threads:[~2026-05-01 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 12:27 Minxi Hou [this message]
2026-05-01 12:27 ` [PATCH 1/2] selftests: openvswitch: add vlan() and encap() flow string parsing Minxi Hou
2026-05-01 12:27 ` [PATCH 2/2] selftests: openvswitch: add pop_vlan test Minxi Hou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260501122756.3081754-1-houminxi@gmail.com \
--to=houminxi@gmail.com \
--cc=dev@openvswitch.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox