From patchwork Mon Mar 11 15:44:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Spewock X-Patchwork-Id: 138160 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE91043C89; Mon, 11 Mar 2024 16:45:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC69240DC9; Mon, 11 Mar 2024 16:44:57 +0100 (CET) Received: from mail-qv1-f98.google.com (mail-qv1-f98.google.com [209.85.219.98]) by mails.dpdk.org (Postfix) with ESMTP id 7672A40A8A for ; Mon, 11 Mar 2024 16:44:54 +0100 (CET) Received: by mail-qv1-f98.google.com with SMTP id 6a1803df08f44-68ee2c0a237so29514506d6.1 for ; Mon, 11 Mar 2024 08:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1710171894; x=1710776694; 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=2ugSq6yZnVJ/8C03p8ipTsvI2OSe9gLyymNSwNRkdc8=; b=D1ugAS1lw7xK9kbWwpuvQIy7fvIGK+MDa5tJ5SPyN3zsy5ViCqjZxk516mymrobHzK 1nL2T8UuHiYHixvo6Vdis1GGgIlcuMgcNSW8veTWGuqH48GCcu7fkYLJf74gqMHeroFP fAzd20GnAXzQiJJMVisSJJrykvz/iWsy+758w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710171894; x=1710776694; 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=2ugSq6yZnVJ/8C03p8ipTsvI2OSe9gLyymNSwNRkdc8=; b=KJ6kkQgTvkhd9BTE9UWZUz5m2mkiRmpa1T+glPHLp/nV5ZG3SzmE1WgoFwPswQuNHD LDxMuqRVDbT6koJjQONfDRrFpuGq0pnMOL08l8XS46OEzanVoVplHUZeGNOyZ3qqTFRt NWxfKhY27Ii9VSo8Voleym+N/R/zVzAmXkmzQbg9/VZ43ofD6vZ9fu8K4HVOIrruQhzr vZJoY0J4RixWxFxGwZrKuw+EZ5QvEVWSPRfDLiG8+Aj68SiLtWQdgILzennBqDZ4M6NX CCAYWuyJp7Dor2h59AE04XMSwVf9YdtclgqRGyn/pl8F7ZYswnDK1F9VRntYD4GAIVGk VKLA== X-Gm-Message-State: AOJu0YwwmpGQocrYbxBOXWC67dVCxuBceAHagjJell/F+fY9q6sBlznl Ug12OYSGiuJGC0pP3J/vJwtkIQI1avEia262QHF7NMcr01LO93T01im6/39F7zabEJRc4HydHdO fKk+ulqGDrllqHR1agUw6y1VhNQhFs6Ew X-Google-Smtp-Source: AGHT+IFREV2lsIzAdI6Pg8JwRAl5A9f2gIDsFn3ELB4kfMScQqP0Y219h1hzkVbXbXupIkuTr/xpUiily8xe X-Received: by 2002:a05:6214:2501:b0:690:c56b:5878 with SMTP id gf1-20020a056214250100b00690c56b5878mr14051156qvb.16.1710171893881; Mon, 11 Mar 2024 08:44:53 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id kl18-20020a056214519200b0068fa33effcbsm262128qvb.39.2024.03.11.08.44.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Mar 2024 08:44:53 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1271:90f9:1b64:f6e6:867f]) by postal.iol.unh.edu (Postfix) with ESMTP id 6E9E66052471; Mon, 11 Mar 2024 11:44:53 -0400 (EDT) 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, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v9 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps Date: Mon, 11 Mar 2024 11:44:00 -0400 Message-ID: <20240311154405.13269-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240311154405.13269-1-jspewock@iol.unh.edu> References: <20240110144249.20719-1-jspewock@iol.unh.edu> <20240311154405.13269-1-jspewock@iol.unh.edu> MIME-Version: 1.0 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.