From patchwork Wed Jan 3 22:12:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Spewock X-Patchwork-Id: 135708 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 C83874380D; Wed, 3 Jan 2024 23:13:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7FCCD402E9; Wed, 3 Jan 2024 23:13:31 +0100 (CET) Received: from mail-pj1-f98.google.com (mail-pj1-f98.google.com [209.85.216.98]) by mails.dpdk.org (Postfix) with ESMTP id 2B341402E8 for ; Wed, 3 Jan 2024 23:13:30 +0100 (CET) Received: by mail-pj1-f98.google.com with SMTP id 98e67ed59e1d1-28b6218d102so8473560a91.0 for ; Wed, 03 Jan 2024 14:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704320009; x=1704924809; 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=MgTCDMbJY4/3Hk/vz+YLI+fmTtDVSLD2UTzRzoVLo00uXMEN8CfqOn1XkYGop9GYJq V5pPFM7qo2507ltb5jyKGwo6YtcobPxAl4oahtBsI4rTF3ddHgdbDreA5AXgF2TcJOjd ExtcNxJgLi3vS5gLNDPzSxoclI+8pHEmh5xQk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704320009; x=1704924809; 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=c9/8QwSf7iR3nAoyI1dxb/nr20fshBDoJ9aQfVY05yFdqpkWK31i4c4SuVr2/PcNjj txUwqI+sbWnmQ3hSrrNcTHODbuhmYe+FVBoBiwvLzpLAm92TT0ESIBluqFPsg5rqPe+g +Q1DcPYTXjn7q3hpleIYZUpHlqlf7JPFYt762XoKV6+JyeYEg3F/QjAdTjPSWWY5HPuB /lIDn4AOF0FP2BUODkcJCDpZzJRYeirFWAMNLcpRubgRaXXgKLrRB6QCBnQOKzX+DevT lQ/EDPuz6zyO0Q3EE0apGBC1RFdNCIrp27ejHpwFFcArJJT2WwLT/f4hjud04LQApBhB usKg== X-Gm-Message-State: AOJu0Yx+qR6f1MYxpxWMNWSxNSEmrxbsuim26/wo0BHfFMjvX8m2hhul /RKaIbGVveU8j6JSmORle5UJyO6t9Y6sP1p4mjL8LuV7Q9w4G0qcNVhPrBg2Ois1LTyospQs6A= = X-Google-Smtp-Source: AGHT+IFsNVUa61FyDEWu8E0AxtaToHnrYJoCWTLIT3fL1q57Gt5wKL4QRIheZbPolEMmWfEOCMUSpjYFGoDa X-Received: by 2002:a17:90a:528b:b0:28c:e611:ee05 with SMTP id w11-20020a17090a528b00b0028ce611ee05mr1841289pjh.74.1704320009480; Wed, 03 Jan 2024 14:13:29 -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 si14-20020a17090b528e00b0028ce2950b90sm145504pjb.15.2024.01.03.14.13.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2024 14:13:29 -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 66EF8605C311; Wed, 3 Jan 2024 17:13:28 -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 v5 2/7] dts: limit EAL parameters to DPDK apps and add parameters to all apps Date: Wed, 3 Jan 2024 17:12:12 -0500 Message-ID: <20240103221217.18954-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240103221217.18954-1-jspewock@iol.unh.edu> References: <20231218181221.10057-1-jspewock@iol.unh.edu> <20240103221217.18954-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 --- 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.