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 2B24143883; Wed, 10 Jan 2024 15:43:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0177D40696; Wed, 10 Jan 2024 15:43:20 +0100 (CET) Received: from mail-pg1-f225.google.com (mail-pg1-f225.google.com [209.85.215.225]) by mails.dpdk.org (Postfix) with ESMTP id 297D840685 for ; Wed, 10 Jan 2024 15:43:16 +0100 (CET) Received: by mail-pg1-f225.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so3237858a12.1 for ; Wed, 10 Jan 2024 06:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704897795; x=1705502595; 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=pRnrX2NkCTD9Oy40zRgq71nD2pbb99S5ImuL2IF0CRE=; b=VVdz86Az5ZgzLWrY/TXpQM26WzbSqTszw6TqsEF6R2xJha9KJ8psO37IIkMpu9FzE8 +rj0q2F4YAXr0zPSEU4gx4qmy6Gy5bq4DNjS+/fO5e6GNnkfgRHclC8z0U2RX0sEmYb3 StoxhbSfqfuHC5aDFUVFbyAld2B2myVKRfHc4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704897795; x=1705502595; 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=pRnrX2NkCTD9Oy40zRgq71nD2pbb99S5ImuL2IF0CRE=; b=et3MRmjziRIWhzd6ZNUIhMuUHqksxxH+5W9ymdCZvYHr3ozjY8CDBTMEjLNCh07wnP XS/IqcBAkpxIJphMY9eWI7XpN3qFN9W6EDouhFL0bVvroCUbyiWy0CqDFegarnme7nBb Zdhjd48egAiFG9nMZUf9V8jQd7VNoy3avavfCZOTd69WqXUlLI+fGQRDpk4maO7H2VoC SNeoZBSD8+nrawujRntFl+I1MS3FxjrgUSjArc0YPCvteZqFqTYO04Hv5LU8x6F1ETty 9JvuTeQ9io1bAMHq9/A+5O8Ht+1ggF7aBfhVDp+U1+bGMr2vbdzWB79kg0tQUoODSIPR nlCA== X-Gm-Message-State: AOJu0YxJJ7hIkTfIe+szSP8m5x5ymuM4UF4PBlHk+aPxUz+WbLuMoKFr vaM53oBOSmK2UKPhAsYtEzdzJ/aLJkNnnmzw35ymRsCEeeLfkkivHk8c2UuQ3TKYAfdRqW7HkQ= = X-Google-Smtp-Source: AGHT+IGu8yZxeCe8wsqSx+1d/v4JZIj8PV3ixLeuKVp3Ub33ECXk5OllKc9GaKfejlRV9QnI6gzOoU/wGzTL X-Received: by 2002:a17:90a:c90d:b0:28c:17de:c8ce with SMTP id v13-20020a17090ac90d00b0028c17dec8cemr850958pjt.2.1704897795033; Wed, 10 Jan 2024 06:43:15 -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 qb4-20020a17090b280400b0028b042385ecsm88460pjb.9.2024.01.10.06.43.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2024 06:43:15 -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 AE6706043482; Wed, 10 Jan 2024 09:43:13 -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 4/7] dts: add pci addresses to EAL parameters Date: Wed, 10 Jan 2024 09:42:46 -0500 Message-ID: <20240110144249.20719-5-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 Added allow list to the EAL parameters created in DTS to ensure that only the relevant PCI devices are considered when launching DPDK applications. Signed-off-by: Jeremy Spewock --- dts/framework/testbed_model/sut_node.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py index 909394e756..97aa26d419 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -30,6 +30,7 @@ from .cpu import LogicalCoreCount, LogicalCoreList from .node import Node from .os_session import InteractiveShellType, OSSession +from .port import Port from .virtual_device import VirtualDevice @@ -46,6 +47,7 @@ def __init__( prefix: str, no_pci: bool, vdevs: list[VirtualDevice], + ports: list[Port], other_eal_param: str, ): """Initialize the parameters according to inputs. @@ -63,6 +65,7 @@ def __init__( VirtualDevice('net_ring0'), VirtualDevice('net_ring1') ] + ports: The list of ports to allow. other_eal_param: user defined DPDK EAL parameters, e.g.: ``other_eal_param='--single-file-segments'`` """ @@ -73,6 +76,7 @@ def __init__( self._prefix = f"--file-prefix={prefix}" self._no_pci = "--no-pci" if no_pci else "" self._vdevs = " ".join(f"--vdev {vdev}" for vdev in vdevs) + self._ports = " ".join(f"-a {port.pci}" for port in ports) self._other_eal_param = other_eal_param def __str__(self) -> str: @@ -83,6 +87,7 @@ def __str__(self) -> str: f"{self._prefix} " f"{self._no_pci} " f"{self._vdevs} " + f"{self._ports} " f"{self._other_eal_param}" ) @@ -347,6 +352,7 @@ def create_eal_parameters( append_prefix_timestamp: bool = True, no_pci: bool = False, vdevs: list[VirtualDevice] | None = None, + ports: list[Port] | None = None, other_eal_param: str = "", ) -> "EalParameters": """Compose the EAL parameters. @@ -370,6 +376,8 @@ def create_eal_parameters( VirtualDevice('net_ring0'), VirtualDevice('net_ring1') ] + ports: The list of ports to allow. If :data:`None`, all ports listed in `self.ports` + will be allowed. other_eal_param: user defined DPDK EAL parameters, e.g.: ``other_eal_param='--single-file-segments'``. @@ -388,12 +396,16 @@ def create_eal_parameters( if vdevs is None: vdevs = [] + if ports is None: + ports = self.ports + return EalParameters( lcore_list=lcore_list, memory_channels=self.config.memory_channels, prefix=prefix, no_pci=no_pci, vdevs=vdevs, + ports=ports, other_eal_param=other_eal_param, ) -- 2.43.0