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 1B2A34577A; Fri, 9 Aug 2024 17:14:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0508842FDD; Fri, 9 Aug 2024 17:14:25 +0200 (CEST) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 5D02D42FDD for ; Fri, 9 Aug 2024 17:14:23 +0200 (CEST) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1fda7fa60a9so19478445ad.3 for ; Fri, 09 Aug 2024 08:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1723216462; x=1723821262; 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=mjU2aOIoxbXHRBoaikO5YDlZy+8b9t4HtbCBDMSSfao=; b=cXtoDScocHaXqEMP3f68Lsgch80eFakCM9EtptymnBtkGnLkvbyKkmqjm3XEH748Xl A6PN3u7vTEmXbBpV+KeydxBflwKSk0MqDydpgh9JDBH0ODOVEsfOfy8Kmg39oSTLCu6i 7tIR758/Lxqx0IlBoC6HJ1RDmD79zThe1jp0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723216462; x=1723821262; 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=mjU2aOIoxbXHRBoaikO5YDlZy+8b9t4HtbCBDMSSfao=; b=eLAK35wG2HGMie6tiRTEcFmcjarHeZB/zPGDQWWI+mEEIPZ9m0j/ZVOStELNGH8fq4 lIcedtFubpFlxu5DpuRUkicXQxoZD2IdWMD0GmNtbnhtqI9iF0J+wjBxYxUHdeWXy3P8 xrxOb6FwKMKGJnRRp/rtXActNL7dC0XpFxyztR3o5pKTz6fT2hP/PEXiRjI4yUWjuUSS sNZIts/kMhGHnS0DlAqEtplgwx9DJvj1i2PEMrrI0+aNrlINqyRmpGLBReHU32o1W/vt 96pFhehwmWVd53DxmVlhFDk08R3Jh8ZD7d3Nnm+tw2MaDN2gavM1koTI4Pl+9Tw8BLZ+ 0/Uw== X-Gm-Message-State: AOJu0Yx775QWLUwP08MiqxQicW4pPrjTSw6IB3f95zfj5t+HR7uKXAHT RjGelpiA3uVbAbm7tdP8SHUGJYYDCQMFQy2Sgy7hRsRzvMJ2rIiBPffEPGF+2Hx4gtM4/5fx5lf YGvBiIGrLsHx4I7ywGQgl7N+9+gZOm6qs2s8SN9Th4JnqIuDb+3A= X-Google-Smtp-Source: AGHT+IFouhi7x5ocgzyOO8jhCY6A/b8CUGP1S9RPudOJXf9kd9SnKFmgs71vR9Zlh64U3WN7fA3PviJEfPCc0cGRjnA= X-Received: by 2002:a17:903:234e:b0:1f8:67e4:3985 with SMTP id d9443c01a7336-200ae5e8c4bmr22769735ad.49.1723216462240; Fri, 09 Aug 2024 08:14:22 -0700 (PDT) MIME-Version: 1.0 References: <20240806121417.2567708-1-Luca.Vizzarro@arm.com> <20240806124642.2580828-1-luca.vizzarro@arm.com> <20240806124642.2580828-6-luca.vizzarro@arm.com> In-Reply-To: <20240806124642.2580828-6-luca.vizzarro@arm.com> From: Jeremy Spewock Date: Fri, 9 Aug 2024 11:14:11 -0400 Message-ID: Subject: Re: [PATCH v2 5/5] dts: add testpmd set ports queues To: Luca Vizzarro Cc: dev@dpdk.org, =?UTF-8?Q?Juraj_Linke=C5=A1?= , Honnappa Nagarahalli , Paul Szczepanek 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 Tue, Aug 6, 2024 at 8:49=E2=80=AFAM Luca Vizzarro wrote: > > Add a facility to update the number of TX/RX queues during the runtime > of testpmd. > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > dts/framework/remote_session/testpmd_shell.py | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index ca24b28070..85fbc42696 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -805,6 +805,22 @@ def start_all_ports(self, verify: bool =3D True) -> = None: > > self.ports_started =3D True > > + @requires_stopped_ports > + def set_ports_queues(self, number_of: int) -> None: Was there a reason to not add a verify option to this method? It seems like it could be useful, and the general pattern with testpmd methods so far is verifying the outcome wherever we can. > + """Sets the number of queues per port. > + > + Args: > + number_of: The number of RX/TX queues to create per port. Is there any value in allowing users to set either Rx or Tx rather than enforcing they change both? I guess I can't think of a specific reason to do one and not the other off the top of my head, but it seems like the option could be useful. > + > + Raises: > + InternalError: If `number_of` is invalid. I might be more in favor of this being an InteractiveCommandExecutionError or some other DTSError just to have a little more control over the error codes and to make it more clear that the error came specifically from the framework. > + """ > + if number_of < 1: > + raise InternalError("The number of queues must be positive a= nd non-zero") > + > + self.send_command(f"port config all rxq {number_of}") > + self.send_command(f"port config all txq {number_of}") > + > def show_port_info_all(self) -> list[TestPmdPort]: > """Returns the information of all the ports. > > -- > 2.34.1 >