[PATCH v4 1/2] dts: add stop ports decorator for VLAN functions
Paul Szczepanek
paul.szczepanek at arm.com
Thu Jan 9 19:01:23 CET 2025
Testpmd functions manipulating the VLAN options require
the ports to be stopped when applying changes.
Signed-off-by: Paul Szczepanek <paul.szczepanek at arm.com>
---
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
More information about the dev
mailing list