From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8349D23815B for ; Tue, 5 May 2026 12:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777985421; cv=none; b=R831RpaIlAzpx88tbMxEStULTTeGRF/Y1Cl1xY6Uy3OdgayHqKR19BrNON8kXFRociDuKraOT02tlGgSjQFad2qUudfSw/TG1vpd6sh188OfE5KZ03fCNHk6pLUcVsMIC2xP+oD1uMaT+6L0vHC2XHER7DEASAmoxcEq8ipi9eQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777985421; c=relaxed/simple; bh=tm0PUIOO7irF/uPbiShHjbLnW9yJ+osDka6vaKqM2AE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Q2FOpTWJHs18hUY2CkIPwo0t8veFn11lsgQDkhDPCVl/YmA5QKx4VAk12kUUFSo2RFedoMmQ7w+ee+oMJgXV2eorjVsjW0jgQfXlCwyV5zdBbSeuRNMRF0QZKXTTlcozB0SdFEP+vGKxVVHXG7XiuePcWlDVrSKQGFbkezVT6Wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ItDpii59; arc=none smtp.client-ip=209.85.210.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ItDpii59" Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7d1872504cbso4360694a34.0 for ; Tue, 05 May 2026 05:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777985416; x=1778590216; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xfAY/hy6pRZsmaeE2NRKXg3RnVIaQy/IqHfb0ZughJA=; b=ItDpii59aT7iYpM/ql+qa9uwdQ19askRUS0Zek6gheThhqSkRAKy3OzSjYQt3C8M8X 1khQ4uoSf6DmsifrO4PlKANzsgYJcK6uFYg17xXgIsFLr97AKVkOqPOVLGDiC20Xxx7f V9t7stSkUOOqWWExH6Q+qbzdxBdmYFyr8yfZRxP3Fuo76se1m2Sm3YLXomiShENp49t/ 87TB7eXScspQ4/LtEwTazbjX8PVMpPkF8L+T0cnrBOcISf6CAXFh+2bNt7xGdzR4Fjw4 HO95DCAIuHRoBJQk3tpT9eWKg7+dcRThbP+joToBJNBBsNFXqu3AkaOYKCxi7/y+lt6r 1n/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777985416; x=1778590216; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xfAY/hy6pRZsmaeE2NRKXg3RnVIaQy/IqHfb0ZughJA=; b=JScb6uaOPwhDLjfsKyidPhGu7JkfH5X2gOt7BRvJ9xPYpZxlsat2aMImhTUzEFVWMI v3cI5AVubagN78Gysd2JVugv9b3Xe7rdkeg8r5V42NPmQoM4WGL9jb57tKl0m4lbeA+x 9li2lwbqb5i/KNmmcqMlQhlD2M6Jsk1HajxdXatqBJU1QVwB3dBZtPOZm6+KthBNS19P kmO8bBZDSk/H7md5fovuTfRi9sm9SAOd/KpvuH/zyhpb7ogAuzj92IFHgHQQhqoVE/Vf c9AEvow71v6FyAk2RKSrqGeJBTS4wx/r1/R7ueQJs6qToO/YqLBNxdUhFkgRdwDdZTMv UZMg== X-Forwarded-Encrypted: i=1; AFNElJ97hNTBI6OwKLZF7OeLG+2i7TTfvICQiCzrn0/oMq76t8F0fOpwMAGwGp6laDnAg/cwNu/ET5AgepE5AHg=@vger.kernel.org X-Gm-Message-State: AOJu0Yyz+3dkFH8x5HAIXMBLx/tt93m7/CvfB5dghq7HFeAiTRGMDswo Bg4+eC3rgdLaVIdBSaQTqfNKcLV7yDlmZNOC75tUgmtDt5pAprtW5e2L X-Gm-Gg: AeBDieslzH4W6jTo3uKAzcYrXgX7D7jK3ErXdCx/iwptG37ezJ5Baqjj7vRh7sNH0c2 Y1s3j53Yp8T6Fd/g8WO811gB2bzy+FZ9eXkl6xymwy8BQ3RYlF9EbinIk1v9h/YUnEsMdjlumeb CAOFhf5U4UuNhOdzqohsLKPzDWCQxFJK7DtuA2NGxyISHZ6IplYF3XeuxyNyTEaCYDSGc1pdp+Z FG1FBra7YB6CcloM65mMlMn5oLmXRsv1jqEiGmaK1BwSRmZ1zp3BTmtJ28D77po9b9DWkcKs+DL nlDDa3fGJv6AWi3arr/cLp+g1mfeIm4ylq+DDfgn1xqOPvHVloFlHm3++GGgYaa506/OsOE8JG/ mSIuC6Uo0OYbQTFzIeQhVFSVlQ+Asj5GcQOyXIG4NhQMd1K6CWIeatHGm13I1r5ENBPyoO5OHJM e1iHhPSn2vb5utL5BbJosIkl8tmw== X-Received: by 2002:a05:6830:4423:b0:7d7:e3d7:e200 with SMTP id 46e09a7af769-7e0bfce9c38mr1942793a34.6.1777985415715; Tue, 05 May 2026 05:50:15 -0700 (PDT) Received: from houminxi ([72.244.37.221]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7deca7a5e75sm9884812a34.2.2026.05.05.05.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 05:50:15 -0700 (PDT) From: Minxi Hou To: netdev@vger.kernel.org Cc: aconole@redhat.com, echaudro@redhat.com, i.maximets@ovn.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, shuah@kernel.org, dev@openvswitch.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Minxi Hou Subject: [PATCH net-next v5 0/2] selftests: openvswitch: add pop_vlan test Date: Tue, 5 May 2026 20:49:55 +0800 Message-ID: <20260505124957.1239812-1-houminxi@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. It also adds push_vlan action support (parse/format with range validation) and removes the unnecessary MAX_ENCAP_DEPTH limit. Patch 2 adds the selftest using purely ping-based verification with a push_vlan return flow for symmetric bidirectional testing. Tested with vng on x86_64, all OVS selftests pass (including new test_pop_vlan). v5: - add push_vlan action class, dpstr format and parse with range validation (vid 0-4095, pcp 0-7, tpid 0-0xFFFF, CFI forced to 1) - remove MAX_ENCAP_DEPTH constant and depth tracking (bracket-depth counter in encap parser already handles nesting) - remove start_capture/stop_capture helpers and tcpdump/pcap verification — use ping success/failure instead - remove modprobe/netns pre-flight checks (other tests don't do this) - remove ethtool VLAN offload disable (unnecessary for veth) - add push_vlan return flow for symmetric bidirectional ping - use ovs_sbx wrapper for ping commands (consistent with siblings) v4: https://lore.kernel.org/netdev/20260504123713.555461-1-houminxi@gmail.com/ - fix all checkpatch line-length warnings in new code - fix pylint W0707: use explicit exception chaining (from exc) v3: https://lore.kernel.org/netdev/20260503120946.51869-1-houminxi@gmail.com/ - 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 - encap parse(): check return value for unrecognized trailing content - vlan parser: boundary check + raise-from for exception chaining - start_capture: || return $? to propagate ksft_skip correctly - 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 | 77 +++++ .../selftests/net/openvswitch/ovs-dpctl.py | 322 +++++++++++++++++- 2 files changed, 389 insertions(+), 10 deletions(-) -- 2.53.0