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 <[email protected]> --- v1 -> v2: rebase to latest net-next/main, drop --base=auto v1: https://lore.kernel.org/netdev/[email protected]/ 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(-) -- 2.53.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
