DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dts: fix MTU set command
@ 2025-01-07 14:11 Luca Vizzarro
  2025-01-07 15:04 ` Patrick Robb
  2025-01-07 16:14 ` Nicholas Pratte
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Vizzarro @ 2025-01-07 14:11 UTC (permalink / raw)
  To: dev; +Cc: Patrick Robb, Luca Vizzarro, Paul Szczepanek

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.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dts: fix MTU set command
  2025-01-07 14:11 [PATCH] dts: fix MTU set command Luca Vizzarro
@ 2025-01-07 15:04 ` Patrick Robb
  2025-01-07 16:14 ` Nicholas Pratte
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick Robb @ 2025-01-07 15:04 UTC (permalink / raw)
  To: Luca Vizzarro; +Cc: dev, Paul Szczepanek

[-- Attachment #1: Type: text/plain, Size: 46 bytes --]

Reviewed-by: Patrick Robb <probb@iol.unh.edu>

[-- Attachment #2: Type: text/html, Size: 144 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dts: fix MTU set command
  2025-01-07 14:11 [PATCH] dts: fix MTU set command Luca Vizzarro
  2025-01-07 15:04 ` Patrick Robb
@ 2025-01-07 16:14 ` Nicholas Pratte
  1 sibling, 0 replies; 3+ messages in thread
From: Nicholas Pratte @ 2025-01-07 16:14 UTC (permalink / raw)
  To: Luca Vizzarro; +Cc: dev, Patrick Robb, Paul Szczepanek

Thanks Luca!

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

On Tue, Jan 7, 2025 at 9:13 AM Luca Vizzarro <luca.vizzarro@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.vizzarro@arm.com>
> Reviewed-by: Paul Szczepanek <paul.szczepanek@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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-07 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-07 14:11 [PATCH] dts: fix MTU set command Luca Vizzarro
2025-01-07 15:04 ` Patrick Robb
2025-01-07 16:14 ` Nicholas Pratte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).