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 CBC8E43883; Wed, 10 Jan 2024 15:43:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09C0F402F1; Wed, 10 Jan 2024 15:43:15 +0100 (CET) Received: from mail-yw1-f225.google.com (mail-yw1-f225.google.com [209.85.128.225]) by mails.dpdk.org (Postfix) with ESMTP id 6B0CB402CC for ; Wed, 10 Jan 2024 15:43:13 +0100 (CET) Received: by mail-yw1-f225.google.com with SMTP id 00721157ae682-5efb0e180f0so41725627b3.1 for ; Wed, 10 Jan 2024 06:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704897793; x=1705502593; 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=81QIl95D/luKOFCRremptKj0NAtei/OAWDhJqGrkUF4=; b=foIc93ovSIBa2h7vhPVPLaMSvFlakqXi4mWZRlII7RE5vl3jo6bOjoESLpWibSni0m G6hmoTKsKGub4WshX4t6XzdUk4jANPGmJbQRDk5f05wVHkm4M+qe9XDY0Vu7aIVfm/Do 9m7seNO/iUntXHbAST94/bZRipw40sJXX8tC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704897793; x=1705502593; 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=81QIl95D/luKOFCRremptKj0NAtei/OAWDhJqGrkUF4=; b=BpXhbfePWqDqD8fA4g8Cclb4rigggzT+w8kRoIEgu0mgdXlm0tW8wceZMjia80F05k vCWbzbtL6/XAZs7zmQ15SMs0dbkd/8SWBITxrRw74xugxacXuH700W62+Q/9cYg6yA9I iZP0K4dHz6YbMFLnUBmc+Zia/1nhFa5fzUfrSZTJN9T/j8vpnw++II9Z5fIKbEOQT2yG gIgZgfOCwqeZRHyQRxicz6H7ddDjbGHE7LBQd9+V9LE9pdHVxUf4EQgdtfadnrtVUgPC ZHHmjP+OwynbmhAmMI+vC/CiiNEIP0pfrBqRfEu/Y2woEU71CeOPn4EUGAZBSOqOCpEX wHKA== X-Gm-Message-State: AOJu0YwBYKEbJeFiUyWRUaUHutEmUJTht+hScHu+kj0HU+doNDor7vg1 Bhi2kst/NluEWQUCD3mW8koO0VPwF5QJUmqTE2kDF1y9EfHqBGyyBFRlOw== X-Google-Smtp-Source: AGHT+IHF/U6I8Bv036Ldq54gE+m85JmIInIyuMf4Hv8qb69ANIMH/gHgLmnucn+rZ3UZumkXadvY/X29mc25 X-Received: by 2002:a25:ab88:0:b0:dbd:2e78:f8ad with SMTP id v8-20020a25ab88000000b00dbd2e78f8admr751473ybi.118.1704897792627; Wed, 10 Jan 2024 06:43:12 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id x196-20020a25cecd000000b00dbcc78ac8ddsm240555ybe.10.2024.01.10.06.43.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2024 06:43:12 -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 DFC586043481; Wed, 10 Jan 2024 09:43:11 -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 v8 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps Date: Wed, 10 Jan 2024 09:42:44 -0500 Message-ID: <20240110144249.20719-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240110144249.20719-1-jspewock@iol.unh.edu> References: <20240109153633.766-1-jspewock@iol.unh.edu> <20240110144249.20719-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 --- dts/framework/remote_session/testpmd_shell.py | 2 +- dts/framework/testbed_model/sut_node.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index 3a66907394..cb2ab6bd00 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..909394e756 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -430,7 +430,8 @@ def create_interactive_shell( shell_cls: Type[InteractiveShellType], timeout: float = SETTINGS.timeout, privileged: bool = False, - eal_parameters: EalParameters | str | None = None, + app_parameters: str = "", + eal_parameters: EalParameters | None = None, ) -> 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