DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeremy Spewock <jspewock@iol.unh.edu>
To: Nicholas Pratte <npratte@iol.unh.edu>
Cc: probb@iol.unh.edu, dmarx@iol.unh.edu, luca.vizzarro@arm.com,
	 yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com,
	 paul.szczepanek@arm.com, juraj.linkes@pantheon.tech,
	dev@dpdk.org
Subject: Re: [RFC PATCH v3 1/2] dts: add port config mtu options to testpmd shell
Date: Fri, 2 Aug 2024 15:54:36 -0400	[thread overview]
Message-ID: <CAAA20UQEu=Jf9f6nn2a9CBUUyfMyEkAvzR4xJKB6sV-4nb=pmg@mail.gmail.com> (raw)
In-Reply-To: <20240726141307.14410-2-npratte@iol.unh.edu>

Hey Nick,

Looks good to me, I just had one comment about what looks like a
mistake in a merge, and then another more general question.

On Fri, Jul 26, 2024 at 10:13 AM Nicholas Pratte <npratte@iol.unh.edu> wrote:
>
> Testpmd offers mtu configuration options that omit ethernet overhead
> calculations when set. This patch adds easy-of-use methods to leverage
> these runtime options.
>
> Bugzilla ID: 1421
>
> Signed-off-by: Nicholas Pratte <npratte@iol.unh.edu>
> ---
>  dts/framework/remote_session/testpmd_shell.py | 20 ++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
> index eda6eb320f..83f7961359 100644
> --- a/dts/framework/remote_session/testpmd_shell.py
> +++ b/dts/framework/remote_session/testpmd_shell.py
> @@ -804,7 +804,25 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats:
>
>          return TestPmdPortStats.parse(output)
>
> -    def _close(self) -> None:
> +    def configure_port_mtu(self, port_id: int, mtu_length: int) -> None:

Was there a reason you decided to omit the verify parameter? I think
it would still be valuable to have just so the developer knows that if
they get past this step they are guaranteed to have a modified MTU. I
think you can do it with port info and I actually wrote the same
method in my (albeit, old and outdated now) scatter expansion patch if
you wanted to see an example of what I mean [1]. Additionally, I think
on some NICs you also have to stop the port before you can adjust the
MTU, so this could fail in some cases.

> +        """Set the MTU length on a designated port.
> +
> +        Args:
> +            port_id: The ID of the port being configured.
> +            mtu_length: The length, in bytes, of the MTU being set.
> +        """
> +        self.send_command(f"port config mtu {port_id} {mtu_length}")
> +
> +    def configure_port_mtu_all(self, mtu_length: int) -> None:
> +        """Set the MTU length on all designated ports.
> +
> +        Args:
> +            mtu_length: The MTU length to be set on all ports.
> +        """
> +        for port in self.show_port_info_all():
> +            self.send_command(f"port config mtu {port.id} {mtu_length}")
> +
> +    def close(self) -> None:

This looks like something that went wrong in the merge, this method is
called _close on main and that is the one that
SingleActiveIntactiveShells use to properly close.

>          """Overrides :meth:`~.interactive_shell.close`."""
>          self.stop()
>          self.send_command("quit", "Bye...")
> --
> 2.44.0
>
[1] https://patchwork.dpdk.org/project/dpdk/patch/20240709175341.183888-2-jspewock@iol.unh.edu/

  reply	other threads:[~2024-08-02 19:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-24 18:36 [RFC PATCH 0/1] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-05-24 18:36 ` [RFC PATCH] Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-07-26 14:09   ` [RFC PATCH v3 0/2] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-06-21 21:13 ` [RFC PATCH v2 0/1] " Nicholas Pratte
2024-06-21 21:19 ` [RFC PATCH v2] Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-06-21 22:18   ` Stephen Hemminger
2024-06-21 23:54     ` Honnappa Nagarahalli
2024-06-25 19:57       ` Nicholas Pratte
2024-06-25 21:57         ` Thomas Monjalon
2024-07-01 16:45           ` Nicholas Pratte
2024-06-25 23:49         ` Stephen Hemminger
2024-07-26 14:13 ` [RFC PATCH v3 0/2] Initial Implementation For Jumbo Frames Nicholas Pratte
2024-07-26 14:13   ` [RFC PATCH v3 1/2] dts: add port config mtu options to testpmd shell Nicholas Pratte
2024-08-02 19:54     ` Jeremy Spewock [this message]
2024-08-22  9:14       ` Juraj Linkeš
2024-07-26 14:13   ` [RFC PATCH v3 2/2] dts: Initial Implementation For Jumbo Frames Test Suite Nicholas Pratte
2024-08-02 19:54     ` Jeremy Spewock
2024-08-28  9:52     ` Alex Chapman
2024-08-29 19:04       ` Nicholas Pratte
2024-09-19 15:54   ` [RFC PATCH v3 0/2] Initial Implementation For Jumbo Frames Alex Chapman

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='CAAA20UQEu=Jf9f6nn2a9CBUUyfMyEkAvzR4xJKB6sV-4nb=pmg@mail.gmail.com' \
    --to=jspewock@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=juraj.linkes@pantheon.tech \
    --cc=luca.vizzarro@arm.com \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=yoan.picchi@foss.arm.com \
    /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).