[v4,1/2] dts: add stop ports decorator for VLAN functions
Checks
Commit Message
Testpmd functions manipulating the VLAN options require
the ports to be stopped when applying changes.
Signed-off-by: Paul Szczepanek <paul.szczepanek@arm.com>
---
dts/framework/remote_session/testpmd_shell.py | 3 +++
1 file changed, 3 insertions(+)
Comments
Reviewed-by: Luca Vizzarro <luca.vizzarro@arm.com>
@@ -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.