Thanks Luca!

Reviewed-by: Nicholas Pratte <npra...@iol.unh.edu>

On Tue, Jan 7, 2025 at 9:13 AM Luca Vizzarro <luca.vizza...@arm.com> wrote:
>
> There are some PMDs that in order to set a scatter-offload-compatible
> MTU size, they need to have started at least once since the startup of
> testpmd. This fixes the behaviour of the command to start and stop the
> ports before changing the MTU to ensure this happened
>
> Fixes: 9910db35962b ("dts: add MTU config methods to testpmd shell")
>
> Signed-off-by: Luca Vizzarro <luca.vizza...@arm.com>
> Reviewed-by: Paul Szczepanek <paul.szczepa...@arm.com>
> ---
> Hi there,
>
> sending a fix discovered after running pmd_buffer_scatter on Mellanox.
> Which should just skip, but the capability checks fail.
>
> Best,
> Luca
> ---
>  dts/framework/remote_session/testpmd_shell.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/dts/framework/remote_session/testpmd_shell.py 
> b/dts/framework/remote_session/testpmd_shell.py
> index d187eaea94..c01ee74b21 100644
> --- a/dts/framework/remote_session/testpmd_shell.py
> +++ b/dts/framework/remote_session/testpmd_shell.py
> @@ -1836,13 +1836,16 @@ def csum_set_hw(
>                                                             
> {port_id}:\n{csum_output}"""
>                      )
>
> +    @requires_started_ports
>      @requires_stopped_ports
>      def set_port_mtu(self, port_id: int, mtu: int, verify: bool = True) -> 
> None:
>          """Change the MTU of a port using testpmd.
>
>          Some PMDs require that the port be stopped before changing the MTU, 
> and it does no harm to
>          stop the port before configuring in cases where it isn't required, 
> so ports are stopped
> -        prior to changing their MTU.
> +        prior to changing their MTU. On the other hand, some PMDs require 
> that the port had already
> +        been started once since testpmd startup. Therefore, ports are also 
> started before stopping
> +        them to ensure this has happened.
>
>          Args:
>              port_id: ID of the port to adjust the MTU on.
> --
> 2.43.0
>

Reply via email to