[PATCH v1 3/4] dts: add methods for modifying MTU to testpmd shell

Luca Vizzarro Luca.Vizzarro at arm.com
Mon May 20 19:35:04 CEST 2024


On 14/05/2024 21:14, jspewock at iol.unh.edu wrote:
> diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
> index 33b3e7c5a3..4e608998f9 100644
> --- a/dts/framework/remote_session/testpmd_shell.py
> +++ b/dts/framework/remote_session/testpmd_shell.py
> @@ -227,6 +227,74 @@ def set_forward_mode(self, mode: TestPmdForwardingModes, verify: bool = True):
>                   f"Test pmd failed to set fwd mode to {mode.value}"
>               )
>   
> +    def _stop_port(self, port_id: int, verify: bool = True) -> None:
> +        """Stop port `port_id` in testpmd.
> +
> +        Depending on the PMD, the port may need to be stopped before configuration can take place.
> +        This method wraps the command needed to properly stop ports and take their link down.
> +
> +        Args:
> +            port_id: ID of the port to take down.
> +            verify: If :data:`True` the output will be scanned in an attempt to verify that the
> +                stopping of ports was successful. Defaults to True.
> +
> +        Raises:
> +            InteractiveCommandExecutionError: If `verify` is :data:'True` and the port did not
just a nit: apostrophe used instead of backtick 'True`




More information about the dev mailing list