From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 341C645720; Fri, 2 Aug 2024 21:54:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2583C40E0B; Fri, 2 Aug 2024 21:54:50 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 03DEF40E01 for ; Fri, 2 Aug 2024 21:54:48 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2cd5d6b2581so5976333a91.2 for ; Fri, 02 Aug 2024 12:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1722628488; x=1723233288; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7RMf0esvSihW34PMphZ2o88fjwLYe87550sYk2WZkIQ=; b=GZ0gwrgafkhlus5rUMyEfa1y6NCc9uNzQttCg9YWGe0LZuumvIz+fV2ZaXjqNSR5wP rS2UfGduoGmHnw60gOogeXom3i+gPYYbmqdmRa/TRYJkHhZWZ6U0VkHWGP/4z14Dj5Ez G+0bBbptaM+oQ4ZjTJTN3gK3m08wmkqz/wMAM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722628488; x=1723233288; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7RMf0esvSihW34PMphZ2o88fjwLYe87550sYk2WZkIQ=; b=tqSZYymBWNX8WnvMDbBIIJDNP7N2p9nD0N0P8+StDdbZzUV2oae3ninvLj1AdW5+tK FSz1ThxsJrJj4QklRWmhpNR0kC85fWOJ7TngVeyEQVYqpJ9+5igIj5n8/jm2JzrzGdOp vLabl27sfr9kj2TR8/cHY7AkDiPWDke5Hvs/NEK3GQsKF8fH+0N52DLzIi+2ZhpkSdKA sbhwOjRuxTem6p19DRmkjwNkwRU+bTUCEweG6E2EwcVr0NY2CAsHbCqMgT5K11qSNnb2 RyBh4EJhPH0LQUFf4dp7YyYkhtiihsGC2wTHT63mRnLOzeRJ/aP+2yIz0J5JAWzuhoQt k9dA== X-Forwarded-Encrypted: i=1; AJvYcCW/X+0KRrHn+TJ2Xb0IeL4tN07jz0tPYAgm0Ug2KGjKj6EiA3OjB7bhov1Ilu/wvP7pTw55PSyHrXTpDnY= X-Gm-Message-State: AOJu0Ywk44CSgfP3gELsaxsdJoEVoX0zhNTIhb1OFJJToxT2NYwAPu7z 5vIcrHZhe+E2nvt5UZL1aXcvVegoEAStkn1qpBhC+rlbKLC5OpZ/NzXq48gq4gVplGydrTOtTzu ZTu3X1ZSbbtkWyZ9AlaV9u23TmG3hfAns1zW8Jw== X-Google-Smtp-Source: AGHT+IE9WkQ/N2rZBfej+2FSDS4iAIdrgbRjrbzFjFIo/gyL2vCmsija3qWKTH/ZXPGEU26NxHqCl2H3basXd12M894= X-Received: by 2002:a17:90a:ea15:b0:2c7:1370:f12f with SMTP id 98e67ed59e1d1-2cff9544e46mr4843083a91.40.1722628488025; Fri, 02 Aug 2024 12:54:48 -0700 (PDT) MIME-Version: 1.0 References: <20240524183604.6925-1-npratte@iol.unh.edu> <20240726141307.14410-1-npratte@iol.unh.edu> <20240726141307.14410-2-npratte@iol.unh.edu> In-Reply-To: <20240726141307.14410-2-npratte@iol.unh.edu> From: Jeremy Spewock Date: Fri, 2 Aug 2024 15:54:36 -0400 Message-ID: Subject: Re: [RFC PATCH v3 1/2] dts: add port config mtu options to testpmd shell To: Nicholas Pratte 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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=E2=80=AFAM Nicholas Pratte 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 > --- > 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/framewor= k/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) -> TestPmdPo= rtStats: > > 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-j= spewock@iol.unh.edu/