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 13DA143874; Tue, 9 Jan 2024 16:36:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB6A54069F; Tue, 9 Jan 2024 16:36:56 +0100 (CET) Received: from mail-qk1-f228.google.com (mail-qk1-f228.google.com [209.85.222.228]) by mails.dpdk.org (Postfix) with ESMTP id 3A0AD4067C for ; Tue, 9 Jan 2024 16:36:55 +0100 (CET) Received: by mail-qk1-f228.google.com with SMTP id af79cd13be357-783253c2182so148195085a.3 for ; Tue, 09 Jan 2024 07:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704814614; x=1705419414; 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=22Viv0p4NKB4q9UrUDAvFjYc676iS3F9qZHdqWIctF0=; b=KnM+IKCwTckLjWIqM+L4IYYRp3ZhpNmeu8O7AKOYeJnwz6OsEJNIJfNhzba+vqaoEx obeCjKDNpEPd9FON3ubaMCKY9QcexHcilGH+P8U8prj14GLFKXlTvwpN6/H5NIpEkh7X aLWbEpO9KzP3Y7p6AVaLoQ3Q/BjEdP6JRyD+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704814614; x=1705419414; 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=22Viv0p4NKB4q9UrUDAvFjYc676iS3F9qZHdqWIctF0=; b=n9o7F7Lf3NyDvwkG8bnI9Pq8YCw6Xk8KS8j/OjaRET42VN7zVAjOpIjLhxtlMTN1gs KtPtTTvDgPBfesUhhewoEGNyHoxsDyr9E4rtaF05vTPJD+frFP/0ioj+1MKaJl7CscB6 OuPxMqc/XhZzljSm+5DQsYifuKwYrD04sehP2KhMNOEwot6zp6a08nlnjFkX6OVE6nDT YumuXda9z5PHt1OAfsREydDyJ5wl3y5C7M9xWZ8rkW/siE2CVr7rKqaLbFZIgOBxte+c FRShJ4Q+New0S3JwVmst9UygLtN/6ebnyq3T40rJxO3xlUr/HOKPwKrXaOI2piSJFChg ViEA== X-Gm-Message-State: AOJu0Yw+igB5dKG1diqkuiOsgpsj2DX9Pwe+U2l/f4yLxm/w2T/6sOpp j+HfyHVCkcmWofQt1XJsOEbyNcbVXwEFS3AOi6ss06qVOQyJU2OVER3qYgzo761RAB049YQ3aw= = X-Google-Smtp-Source: AGHT+IH9krnYjOQn1d6dhqauaWQtz3xvFmbvh9K+VDsinmm3M/uk3iWpysHBsHjGVQMyN46fCvBViGFCNTRe X-Received: by 2002:a05:620a:123a:b0:783:1a20:7db3 with SMTP id v26-20020a05620a123a00b007831a207db3mr4738970qkj.143.1704814614644; Tue, 09 Jan 2024 07:36:54 -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 bm37-20020a05620a19a500b007830f0c575fsm37773qkb.5.2024.01.09.07.36.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2024 07:36:54 -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 E5F8B6043300; Tue, 9 Jan 2024 10:36:53 -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 v7 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps Date: Tue, 9 Jan 2024 10:36:28 -0500 Message-ID: <20240109153633.766-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240109153633.766-1-jspewock@iol.unh.edu> References: <20240103223206.23129-1-jspewock@iol.unh.edu> <20240109153633.766-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 11c5c7f93c..8a9578913b 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