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 6F6C54380D; Wed, 3 Jan 2024 23:13:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D8A14067B; Wed, 3 Jan 2024 23:13:34 +0100 (CET) Received: from mail-qt1-f226.google.com (mail-qt1-f226.google.com [209.85.160.226]) by mails.dpdk.org (Postfix) with ESMTP id 2B4ED402EF for ; Wed, 3 Jan 2024 23:13:32 +0100 (CET) Received: by mail-qt1-f226.google.com with SMTP id d75a77b69052e-42832ddd9d1so8680361cf.0 for ; Wed, 03 Jan 2024 14:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1704320011; x=1704924811; 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=9O25ducMATwG+pavw82jWa5njc2pAl93LdrUmF2Ic6s=; b=b3lCywXmEg5qRxt2J2wfUYbyNrxWtW0Cwjpd90pEq0pnwFIK5ag+Pkk5mshLtjYeZ1 t/MHOwhDNqO3yqCeEOHoVnWMdqRfG2Vhqlg97zyQIbs40pbaUoebzrXWvDRwzdTxmqnf HGuumzjanKMAMtNIGPoax94Ek18xuwllSk79k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704320011; x=1704924811; 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=9O25ducMATwG+pavw82jWa5njc2pAl93LdrUmF2Ic6s=; b=rFUqf9VQl/tYJK8PPRkpdcChZQtTZMPHfq2MRN9ctitwEgfpc7wOQE+qNnpuxZLmmb M/MTNC8Rc13AyBQJd4ytQsxMsUhkwRAiNl+M4Zf6/yrBPSkYY7c07gEZnDOFND1lJDfJ Wig732rg5d09kSt6marUN+Bph5Dd1qcJxNdrxtTO5fk7sm+pyqCHFxT2MOuoYg9BBl6l +q4dJzbcsxfbWI3ATSBm9fg2liFeW88fQ74WuWFjwtBh1ThBmM0GhlNkgzMOj+iuFPa7 2uafKSs6+q97p5m6Iq3oyoVjBK70x5RMSWqebzMvuZMEgLFNfHK3haOlRAAKdpaQ6H0q yAWw== X-Gm-Message-State: AOJu0YzpJ4Eyf56tREdCL+sj5bETvITnbuuZ/ndAr5z3ib5kE+FUk15R Nbx4ZEiW97Cfn7rywgR58hwskClSIxdiy4d0ePQbho2aV2KHsr/ka4NdTyCY1bJw5iU4qy+uYg= = X-Google-Smtp-Source: AGHT+IFmWK1XhYn8zSAvJEBEnrc/+tUmzh0ESPvOyE4B0XUnzS0rqHC7Ywuusdb3a1qsoE8PMTledibNa0jS X-Received: by 2002:a05:622a:1646:b0:427:80c4:aa2c with SMTP id y6-20020a05622a164600b0042780c4aa2cmr31584447qtj.50.1704320011554; Wed, 03 Jan 2024 14:13:31 -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 t21-20020a05622a149500b004283623bb53sm99451qtx.26.2024.01.03.14.13.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2024 14:13:31 -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 F3097605C311; Wed, 3 Jan 2024 17:13:30 -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 4/7] dts: add pci addresses to EAL parameters Date: Wed, 3 Jan 2024 17:12:14 -0500 Message-ID: <20240103221217.18954-5-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 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 4df18bc183..cc894fb07d 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