From: Luca Vizzarro <luca.vizzarro@arm.com>
To: dev@dpdk.org
Cc: Patrick Robb <probb@iol.unh.edu>,
Luca Vizzarro <luca.vizzarro@arm.com>,
Paul Szczepanek <paul.szczepanek@arm.com>
Subject: [PATCH] dts: fix MTU set command
Date: Tue, 7 Jan 2025 14:11:25 +0000 [thread overview]
Message-ID: <20250107141125.2611481-1-luca.vizzarro@arm.com> (raw)
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
next reply other threads:[~2025-01-07 14:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 14:11 Luca Vizzarro [this message]
2025-01-07 15:04 ` Patrick Robb
2025-01-07 16:14 ` Nicholas Pratte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250107141125.2611481-1-luca.vizzarro@arm.com \
--to=luca.vizzarro@arm.com \
--cc=dev@dpdk.org \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).