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 7EF3543864; Mon, 8 Jan 2024 12:52:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F10B240263; Mon, 8 Jan 2024 12:52:20 +0100 (CET) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by mails.dpdk.org (Postfix) with ESMTP id 4215840261 for ; Mon, 8 Jan 2024 12:52:19 +0100 (CET) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a298accc440so177819566b.1 for ; Mon, 08 Jan 2024 03:52:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1704714739; x=1705319539; 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=ITXm6zY2yFRrY8hHh2HpoLUOvOKAfFhcBGY8Afek9qg=; b=JapnqS0R03AF+Ov0gqN/3MGzdyNc7bjtaMKR0IBuriuwCSzvavsJLjPC3sL6fagLYu 0+Oqz/vUVn04x/U/PKWvT1JCuoxm9qEDQeUYgrytCArhv/jdXow+cw68DYHH5wte5WSG 4WvAGN3MaWiSJJV9rggKvDDIay6XTgCOgYWH34QlGC6dCeWqDwHhh3vkZpwfBvh5KAeR ci+dw9bFlY9oDrT8+6YvCGZyZmWAMDnzwZ2ODJbSvSBj1SwkAALYUDOmYvg1mhnpVLKC SFkt/P3uNl3pBrUrFuZaadTSmAJhOeylily2Q3gu1sUc9vHzXspgmwP71+V+4l/3Azug ULpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704714739; x=1705319539; 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=ITXm6zY2yFRrY8hHh2HpoLUOvOKAfFhcBGY8Afek9qg=; b=XtRwJFJt08WQcH+15GyUc/rMkGZr0KYJq7RTgzgzeOxpzdZRgAnnpLJxcGi0X5Qn3Z YahCvwTS6SO2ObRqjl8hJJgo+6dRoq+sSIDetC5tmc7TJi++TYVr1WTLJz8W9+7rWxlJ 2yfQg0xA1oVxFUZQpFE6ibFHJ41Wn1VB6M95kNq6E2KcAKWc+kVFyYeC1DWhKVcPEjr6 vDRU3TX1+zEnn/upqUlYwkcxQP0GFoLwpv9rg1WvKm7wpT5vnngczidvQlVDIRagrks3 5mGJ5bKWsbyBHGOUA2d2bdiFdBy2zUUVqNgPOBdlhaOUg6fYnN/YW9taFKVNcXX+qyN8 +uSg== X-Gm-Message-State: AOJu0YyB0lyAoHgompQnYA6xjTRsw3PFR1cnxHc4WQcO9tlTv8uKY/4Z J4OW8MKlxX/cUNf9YMa5Crf5dDNH9AxC6lazkctr+0yBpKjjjw== X-Google-Smtp-Source: AGHT+IHmCnkpcvHQD1YQvD4m8K08jrVeOeI651TBUTYdoC7eGRm4J2pUz5ynbXMCPi89s6IyuPUfngg+aNj2jmVBW10= X-Received: by 2002:a17:906:d284:b0:a2a:ed58:f9b with SMTP id ay4-20020a170906d28400b00a2aed580f9bmr328299ejb.42.1704714738958; Mon, 08 Jan 2024 03:52:18 -0800 (PST) MIME-Version: 1.0 References: <20240103221217.18954-1-jspewock@iol.unh.edu> <20240103223206.23129-1-jspewock@iol.unh.edu> <20240103223206.23129-3-jspewock@iol.unh.edu> In-Reply-To: <20240103223206.23129-3-jspewock@iol.unh.edu> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Mon, 8 Jan 2024 12:52:08 +0100 Message-ID: Subject: Re: [PATCH v6 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps To: jspewock@iol.unh.edu Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net, wathsala.vithanage@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, lylavoie@iol.unh.edu, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, 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 Wed, Jan 3, 2024 at 11:33=E2=80=AFPM wrote: > > From: Jeremy Spewock > > Changed the factory method for creating interactive apps in the SUT Node > so that EAL parameters would only be passed into DPDK apps since > non-DPDK apps wouldn't be able to process them. Also modified > interactive apps to allow for the ability to pass parameters into the > app on startup so that the applications can be started with certain > configuration steps passed on the command line. > > Signed-off-by: Jeremy Spewock > --- > > I ended up reverting part of this back to making the argument for > eal_parameters allowed to be a string. This was because it was casuing > mypy errors where the method signatures of sut_node did not match with > that of node. > This is because the signatures don't actually match :-) The eal_parameters parameter is added on not top of what's in the base methods. I suggest we move eal_parameters to the end and then we don't need to allow str for eal_parameters. > dts/framework/remote_session/testpmd_shell.py | 2 +- > dts/framework/testbed_model/sut_node.py | 14 +++++++++----- > 2 files changed, 10 insertions(+), 6 deletions(-) > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index f310705fac..8f40e8f40e 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -118,7 +118,7 @@ def _start_application(self, get_privileged_command: = Callable[[str], str] | None > Also find the number of pci addresses which were allowed on the = command line when the app > was started. > """ > - self._app_args +=3D " -- -i --mask-event intr_lsc" > + self._app_args +=3D " -i --mask-event intr_lsc" > self.number_of_ports =3D self._app_args.count("-a ") > super()._start_application(get_privileged_command) > > diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/test= bed_model/sut_node.py > index c4acea38d1..4df18bc183 100644 > --- a/dts/framework/testbed_model/sut_node.py > +++ b/dts/framework/testbed_model/sut_node.py > @@ -431,6 +431,7 @@ def create_interactive_shell( > timeout: float =3D SETTINGS.timeout, > privileged: bool =3D False, > eal_parameters: EalParameters | str | None =3D None, > + app_parameters: str =3D "", What I meant above is we should move app_parameters before eal_parameters and then we can remove the str type of eal_parameters. > ) -> InteractiveShellType: > """Extend the factory for interactive session handlers. > > @@ -449,20 +450,23 @@ def create_interactive_shell( > eal_parameters: List of EAL parameters to use to launch the = app. If this > isn't provided or an empty string is passed, it will def= ault to calling > :meth:`create_eal_parameters`. > + app_parameters: Additional arguments to pass into the applic= ation on the > + command-line. > > Returns: > An instance of the desired interactive application shell. > """ > - if not eal_parameters: > - eal_parameters =3D self.create_eal_parameters() > - > - # We need to append the build directory for DPDK apps > + # We need to append the build directory and add EAL parameters f= or DPDK apps > if shell_cls.dpdk_app: > + if not eal_parameters: > + eal_parameters =3D self.create_eal_parameters() > + app_parameters =3D f"{eal_parameters} -- {app_parameters}" > + > shell_cls.path =3D self.main_session.join_remote_path( > self.remote_dpdk_build_dir, shell_cls.path > ) > > - return super().create_interactive_shell(shell_cls, timeout, priv= ileged, str(eal_parameters)) > + return super().create_interactive_shell(shell_cls, timeout, priv= ileged, app_parameters) > > def bind_ports_to_driver(self, for_dpdk: bool =3D True) -> None: > """Bind all ports on the SUT to a driver. > -- > 2.43.0 >