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 BA05B4591F; Fri, 6 Sep 2024 16:29:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5C1440B99; Fri, 6 Sep 2024 16:29:13 +0200 (CEST) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 9C8FD4025D for ; Fri, 6 Sep 2024 16:29:12 +0200 (CEST) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2d1daa2577bso1544765a91.2 for ; Fri, 06 Sep 2024 07:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725632952; x=1726237752; 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=LFZkg2p24FIY0+8TkbXlkcqkclXTYxEV0MaXOWSsH6Y=; b=Sw21Ap9mht+jGMHZ9guxO2IkjuZY7SwCYSPsArtzYS78kK7u49I3dF7G+ZWEMtXr2l pcx6jOth17hM/dYE99x5zHFQYJNRagssAm561YrWW2g8IOomaRIrVVX2lvEUvJI+REzW vhDEF2VAXYuio+DyF9dlkTg7CXnuowl1Bw7S4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725632952; x=1726237752; 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=LFZkg2p24FIY0+8TkbXlkcqkclXTYxEV0MaXOWSsH6Y=; b=dH5DiyUi7+PIsjdospjW1immqkPJZT0nbdVPdxNY97rfukTyR2/WEwizoC4m5x23VX Ur86WRsGBNNJlpaheT5coBVyWyHJ31T47UEdqUVdry3rnvgKEGZAKuu5xm7T1sIpUr2d R/BdlGF6DB5iYGr+i2GVzd2Hx3uRHAJt9jtM277DPTC7icfmYmOk2RivrWq1RmIg53H9 dXf85GVLiNv17Vgq9wBykDn3Sd5kcaGZYY+rLNrWuUUwmyWIJtfChZwL2/TJOmeYFdA9 ErTdB2/N29ulfXDfiAz7nd7Mh/tcr+ZgAZ+1p+/DuXr7aRfXL5zKCjtBeKcKbcOLUI2U F2jw== X-Forwarded-Encrypted: i=1; AJvYcCVleKhX6qljL4QdSkPrqxW/a1YBtmokQgUl7QPcuN/mcUGZJO9VmcxFhv40e5A9Y7Km1T8=@dpdk.org X-Gm-Message-State: AOJu0Yw7FqkwsoZPxXtoUpY0QzjITDAiQtTCcR3+2+OcvcgvAOBOHN0F VV83mBMAcyfnK0Q1Sq6xA95VursHWlPUKz545T4nWzD+/ZVVL/KzdsOMeFJmYxJXn35ZqlnZ3hS FthfLVGZ+kCwzTFzHzHKaIU5XA8XjpgLlNQZabQ== X-Google-Smtp-Source: AGHT+IGM5v8H9D+bJuFhTRCEXz3qk1wyHIxXW5k4rVCWRAaqS93CPKbPWUFBredpTP8prylIPvOdHODjjalI3FSqyBA= X-Received: by 2002:a17:90a:788e:b0:2da:8e9b:f37b with SMTP id 98e67ed59e1d1-2da8e9bf63amr10139012a91.24.1725632951544; Fri, 06 Sep 2024 07:29:11 -0700 (PDT) MIME-Version: 1.0 References: <20240826200203.13560-1-jspewock@iol.unh.edu> <20240905142123.31342-1-jspewock@iol.unh.edu> <20240905142123.31342-2-jspewock@iol.unh.edu> <38a2490c-19d7-4ebb-90ad-36da0933c883@pantheon.tech> In-Reply-To: <38a2490c-19d7-4ebb-90ad-36da0933c883@pantheon.tech> From: Jeremy Spewock Date: Fri, 6 Sep 2024 10:28:59 -0400 Message-ID: Subject: Re: [PATCH v3 1/1] dts: add methods for modifying MTU to testpmd shell To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, wathsala.vithanage@arm.com, probb@iol.unh.edu, yoan.picchi@foss.arm.com, Luca.Vizzarro@arm.com, thomas@monjalon.net, alex.chapman@arm.com, npratte@iol.unh.edu, 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 On Fri, Sep 6, 2024 at 9:58=E2=80=AFAM Juraj Linke=C5=A1 wrote: > > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framew= ork/remote_session/testpmd_shell.py > > index ca24b28070..c1462ba2d3 100644 > > --- a/dts/framework/remote_session/testpmd_shell.py > > +++ b/dts/framework/remote_session/testpmd_shell.py > > @@ -888,6 +888,51 @@ def show_port_stats(self, port_id: int) -> TestPmd= PortStats: > > > + def set_port_mtu_all(self, mtu: int, verify: bool =3D True) -> Non= e: > > + """Change the MTU of all ports using testpmd. > > + > > + Runs :meth:`set_port_mtu` for every port that testpmd is aware= of. > > + > > + Args: > > + mtu: Desired value for the MTU to be set to. > > + verify: Whether to verify that setting the MTU on each por= t was successful or not. > > + Defaults to :data:`True`. > > + > > + Raises: > > + InteractiveCommandExecutionError: If `verify` is :data:`Tr= ue` and the MTU was not > > + properly updated on at least one port. > > + """ > > + if self._app_params.ports is not None: > > We should utilize the port info caching patch here: > https://patches.dpdk.org/project/dpdk/patch/20240823074137.13989-1-juraj.= linkes@pantheon.tech/ > > Other than that, the patch looks good. > That's a good idea, I also like that it sort of detaches this method from the subtle requirement that testpmd is started with an allow list of ports. This requirement is enforced right now, but I think it makes more sense for this method to operate based on what testpmd is aware of anyway. It does add another patch to the dependency chain though, we should probably prioritize getting the info caching patch into next-dts. > > + for port_id in range(len(self._app_params.ports)): > > + self.set_port_mtu(port_id, mtu, verify) > > + > > def _close(self) -> None: > > """Overrides :meth:`~.interactive_shell.close`.""" > > self.stop() >