From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3ADF246036; Thu, 9 Jan 2025 19:01:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4E0340FDE; Thu, 9 Jan 2025 19:01:42 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id DE37340430 for ; Thu, 9 Jan 2025 19:01:41 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4EF8013D5; Thu, 9 Jan 2025 10:02:09 -0800 (PST) Received: from localhost.localdomain (unknown [10.57.73.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 91EF53F59E; Thu, 9 Jan 2025 10:01:40 -0800 (PST) From: Paul Szczepanek To: dev@dpdk.org Cc: Paul Szczepanek Subject: [PATCH v4 1/2] dts: add stop ports decorator for VLAN functions Date: Thu, 9 Jan 2025 18:01:23 +0000 Message-Id: <20250109180124.1678253-1-paul.szczepanek@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240724171345.341495-2-jspewock@iol.unh.edu> References: <20240724171345.341495-2-jspewock@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Testpmd functions manipulating the VLAN options require the ports to be stopped when applying changes. Signed-off-by: Paul Szczepanek --- dts/framework/remote_session/testpmd_shell.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index c01ee74b21..aa55bd91d3 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -1909,6 +1909,7 @@ def extract_verbose_output(output: str) -> list[TestPmdVerbosePacket]: out.append(TestPmdVerbosePacket.parse(f"{prev_header}\n{match.group('PACKET')}")) return out + @requires_stopped_ports def set_vlan_filter(self, port: int, enable: bool, verify: bool = True) -> None: """Set vlan filter on. @@ -1935,6 +1936,7 @@ def set_vlan_filter(self, port: int, enable: bool, verify: bool = True) -> None: filter on port {port}""" ) + @requires_stopped_ports def rx_vlan(self, vlan: int, port: int, add: bool, verify: bool = True) -> None: """Add specified vlan tag to the filter list on a port. Requires vlan filter to be on. @@ -1964,6 +1966,7 @@ def rx_vlan(self, vlan: int, port: int, add: bool, verify: bool = True) -> None: f"Testpmd failed to {'add' if add else 'remove'} tag {vlan} on port {port}." ) + @requires_stopped_ports def set_vlan_strip(self, port: int, enable: bool, verify: bool = True) -> None: """Enable or disable vlan stripping on the specified port. -- 2.39.2