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 201D74380D; Wed, 3 Jan 2024 23:33:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C765D40A6D; Wed, 3 Jan 2024 23:33:07 +0100 (CET) Received: from mail-yw1-f228.google.com (mail-yw1-f228.google.com [209.85.128.228]) by mails.dpdk.org (Postfix) with ESMTP id C59B840A6D for ; Wed, 3 Jan 2024 23:33:05 +0100 (CET) Received: by mail-yw1-f228.google.com with SMTP id 00721157ae682-5e89ba9810aso86904797b3.2 for ; Wed, 03 Jan 2024 14:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704321185; x=1704925985; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9sBuSec7fI7Z7rWHY25CViLMRcwyEg4OGA3nWGh5Sdg=; b=bLfH8F75WK3iWp2QOQQ4vUHjZj4hiBMof24S1y26aLKr7WhfB86+y22dTeZgEKLdV6 7oR1FKjyQSCCyNe00WaetvnmE1av2tQt1DslWhrm+86GU3cJujKq9iK04y2t97wyefDf QAA+TypDxnZNqcwIsuj+PkWgspUSJeOo39cFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704321185; x=1704925985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9sBuSec7fI7Z7rWHY25CViLMRcwyEg4OGA3nWGh5Sdg=; b=f5lZDss2cZ5XHGIhpbZ1XWqNbbvtUiAg2RsdxrSKEfX6pgUWF3fSn3ixpueVwzQqWH ZNBlylhOeb7myaj6bb0+c1NUy2c0uuSKW2/0qX9rJ5Q3V3P3axEQKlucah8PDYgRsFpE RobZg+VuEFgdr6/YO+/92tpb6F2ca75rFy5/4nzacV+WrdMtLIp7S9ZlLZ2Yg06QPizD QRyHVV02AVmPGrKTvmbqyxNQC8NUPYNTnZuS5ubi4c4LMjiNIrnOH8uEsbe5GHSsqIhi OGvdf4XvbmFpc7FOXMFoSv46OnAO4DFI7BgJ4fLaD4dQSG6wHIX7w8HM8ZB19p+vLxVg 0INg== X-Gm-Message-State: AOJu0YwNDvOTOcHUleoFxKaommWGdEnBVpyRfBoUTQJ+HmMHcCGu6OcC CzR/St+Tmgi1U0R0PWJSOaQ2oLo4OwaPuwzSOC5m4puydspeDDj0OLIHRpqEZ1hqdEoNtGn5mQ= = X-Google-Smtp-Source: AGHT+IHCj56OOlmvBeoZ5sYS5lcGWm+OqG8lguEqZnKea0iNBvho8r0NcZG+P2y9DXCAYEDEZsu0nGZnWNTE X-Received: by 2002:a81:530a:0:b0:5d7:1940:53d2 with SMTP id h10-20020a81530a000000b005d7194053d2mr17034360ywb.74.1704321185194; Wed, 03 Jan 2024 14:33:05 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id w14-20020a0dd40e000000b005e98b0e5396sm2035654ywd.44.2024.01.03.14.33.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2024 14:33:05 -0800 (PST) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::1083]) by postal.iol.unh.edu (Postfix) with ESMTP id 78047605C311; Wed, 3 Jan 2024 17:33:04 -0500 (EST) From: jspewock@iol.unh.edu To: Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech, 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 Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v6 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps Date: Wed, 3 Jan 2024 17:32:01 -0500 Message-ID: <20240103223206.23129-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103223206.23129-1-jspewock@iol.unh.edu> References: <20240103221217.18954-1-jspewock@iol.unh.edu> <20240103223206.23129-1-jspewock@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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. 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/framework/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 += " -- -i --mask-event intr_lsc" + self._app_args += " -i --mask-event intr_lsc" self.number_of_ports = self._app_args.count("-a ") super()._start_application(get_privileged_command) diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_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 = SETTINGS.timeout, privileged: bool = False, eal_parameters: EalParameters | str | None = None, + app_parameters: str = "", ) -> 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 default to calling :meth:`create_eal_parameters`. + app_parameters: Additional arguments to pass into the application on the + command-line. Returns: An instance of the desired interactive application shell. """ - if not eal_parameters: - eal_parameters = 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 for DPDK apps if shell_cls.dpdk_app: + if not eal_parameters: + eal_parameters = self.create_eal_parameters() + app_parameters = f"{eal_parameters} -- {app_parameters}" + shell_cls.path = self.main_session.join_remote_path( self.remote_dpdk_build_dir, shell_cls.path ) - return super().create_interactive_shell(shell_cls, timeout, privileged, str(eal_parameters)) + return super().create_interactive_shell(shell_cls, timeout, privileged, app_parameters) def bind_ports_to_driver(self, for_dpdk: bool = True) -> None: """Bind all ports on the SUT to a driver. -- 2.43.0