public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] selftests: openvswitch: add pop_vlan test
@ 2026-05-03 12:09 Minxi Hou
  2026-05-03 12:09 ` [PATCH net-next v3 1/2] selftests: openvswitch: add vlan() and encap() flow string parsing Minxi Hou
  2026-05-03 12:09 ` [PATCH net-next v3 2/2] selftests: openvswitch: add pop_vlan test Minxi Hou
  0 siblings, 2 replies; 3+ messages in thread
From: Minxi Hou @ 2026-05-03 12:09 UTC (permalink / raw)
  To: netdev
  Cc: aconole, echaudro, i.maximets, davem, edumazet, kuba, pabeni,
	horms, shuah, Minxi Hou

Add test_pop_vlan() to verify OVS kernel datapath pop_vlan action
correctly strips 802.1Q VLAN tags from frames.

Patch 1 extends ovs-dpctl.py with vlan(vid=X,pcp=Y,cfi=Z) formatting
and parsing, plus an encap_ovskey subclass for safe ENCAP NLA decoding.
Patch 2 adds the selftest with baseline, negative, and positive checks.

Tested with vng on x86_64, all OVS selftests pass (including new
test_pop_vlan).

v3:
  - encap_ovskey: MPLS type "ovs_key_mpls" -> "array(ovs_key_mpls)"
  - encap_ovskey: PRIORITY/IN_PORT set to "none" (metadata, not in ENCAP)
  - _vlan_dpstr: cfi=0 falls back to tci=0x%04x for round-trip safety
  - _vlan_dpstr: docstring updated to match cfi=0 fallback behavior
  - encap parse(): check return value for unrecognized trailing content
  - vlan parser: add boundary check when both ',' and ')' are missing
  - start_capture: || return 1 -> || return $? (propagate ksft_skip)
  - on_exit: moved after resource creation, not before
  - ping success: changed from NOTE to FAIL + return 1
  - VLAN interface creation: added || return 1 error propagation
  - netns probe: distinguish EEXIST from missing CONFIG_NET_NS
  - sbx_add: || return $ksft_skip -> || return $? (match sibling tests)
v2: https://lore.kernel.org/netdev/20260501133924.3100680-1-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  | 192 +++++++++++++
 .../selftests/net/openvswitch/ovs-dpctl.py    | 267 +++++++++++++++++-
 2 files changed, 451 insertions(+), 8 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-03 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03 12:09 [PATCH net-next v3 0/2] selftests: openvswitch: add pop_vlan test Minxi Hou
2026-05-03 12:09 ` [PATCH net-next v3 1/2] selftests: openvswitch: add vlan() and encap() flow string parsing Minxi Hou
2026-05-03 12:09 ` [PATCH net-next v3 2/2] selftests: openvswitch: add pop_vlan test Minxi Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox