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 7F6B44373D; Mon, 18 Dec 2023 19:13:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84CBC42DC1; Mon, 18 Dec 2023 19:13:07 +0100 (CET) Received: from mail-pl1-f228.google.com (mail-pl1-f228.google.com [209.85.214.228]) by mails.dpdk.org (Postfix) with ESMTP id A4F2D410D0 for ; Mon, 18 Dec 2023 19:13:04 +0100 (CET) Received: by mail-pl1-f228.google.com with SMTP id d9443c01a7336-1d32c5ce32eso32224475ad.0 for ; Mon, 18 Dec 2023 10:13:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1702923184; x=1703527984; 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=MgS8k8OADUeMeErqqsCQEs6yw8FVHzxDoNQ5Ppxx2DY=; b=QlO6eIsoTZcC12Gh8TRmztz334VhygZsr00XekKU+dUA6JO9pv0JKExpH0+xIUqAFm UrvbTtt1daUJsF7eTqlgcGVDIoazUdpG79NTrGjTo/1zl9l2cOp89GletjpRtUmqt+g8 yMjERNzCPq3hOjJJcQIceI0xchxiz8a2PgoHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702923184; x=1703527984; 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=MgS8k8OADUeMeErqqsCQEs6yw8FVHzxDoNQ5Ppxx2DY=; b=cPDKTjEH26nsaOlLTLLJKrqHjVNq35og6tyaloPicrGjrPfwfqgNkazse1TJ1mSX3R +UpAjiG/RdJepGHvMg+bF592+gg062gVx+X4omUBpWDE6ooIaenlxJMFFK0cQvW75sWd d4oy8gpMLXqOwwsYnEEYwq1Z3Hj9xlDeH0vFJJr5Exx0usL6nXm35uZdiu3GbFKbKD06 8+ABUVvTQgqPRORrNATbQ2uxNPN0BohVAwxs5MKJQRef10vqthuV4RSYgE9o8PHSwuUK rd8+huC2TGD3riBLTEFiDlRGkSLpr5gxPjSrSPuNySr7BDo8TCpJ+6Ee2D+jJUSDz1je B/gA== X-Gm-Message-State: AOJu0YxDUCB7Hty8c3e5d9R4G5gQNtvx4sbcRijxCwVGmIjO5VYlPzJN hR1U4caCDHsho46af2xUEX5PJaFzjQIsz8JhXOi3h4IAkTPZhQ== X-Google-Smtp-Source: AGHT+IG8WDPCWvhty8YOfZqqbyODGZZH/pL9JxtXXi3j9p1/yOLCX4p4eaPAyhkIcjdRjIBuu6RoPKN39JjG X-Received: by 2002:a17:902:8b83:b0:1d3:485a:833d with SMTP id ay3-20020a1709028b8300b001d3485a833dmr11044465plb.39.1702923183923; Mon, 18 Dec 2023 10:13:03 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id q11-20020a17090311cb00b001d3ad38d2fesm88522plh.48.2023.12.18.10.13.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2023 10:13:03 -0800 (PST) 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 E14A1605C312; Mon, 18 Dec 2023 13:13:02 -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, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v4 4/7] dts: add pci addresses to EAL parameters Date: Mon, 18 Dec 2023 13:12:18 -0500 Message-ID: <20231218181221.10057-5-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231218181221.10057-1-jspewock@iol.unh.edu> References: <20231218181221.10057-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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/testbed_model/sut_node.py index 9c92232d9e..77caea2fc9 100644 --- a/dts/framework/testbed_model/sut_node.py +++ b/dts/framework/testbed_model/sut_node.py @@ -20,6 +20,7 @@ from framework.utils import MesonArgs from .hw import LogicalCoreCount, LogicalCoreList, VirtualDevice +from .hw.port import Port from .node import Node @@ -31,6 +32,7 @@ def __init__( prefix: str, no_pci: bool, vdevs: list[VirtualDevice], + ports: list[Port], other_eal_param: str, ): """ @@ -46,6 +48,7 @@ def __init__( VirtualDevice('net_ring0'), VirtualDevice('net_ring1') ] + :param ports: the list of ports to allow. :param other_eal_param: user defined DPDK eal parameters, eg: other_eal_param='--single-file-segments' """ @@ -56,6 +59,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: @@ -65,6 +69,7 @@ def __str__(self) -> str: f"{self._prefix} " f"{self._no_pci} " f"{self._vdevs} " + f"{self._ports} " f"{self._other_eal_param}" ) @@ -294,6 +299,7 @@ def create_eal_parameters( append_prefix_timestamp: bool = True, no_pci: bool = False, vdevs: list[VirtualDevice] = None, + ports: list[Port] | None = None, other_eal_param: str = "", ) -> "EalParameters": """ @@ -317,6 +323,7 @@ def create_eal_parameters( VirtualDevice('net_ring0'), VirtualDevice('net_ring1') ] + :param ports: the list of ports to allow. :param other_eal_param: user defined DPDK eal parameters, eg: other_eal_param='--single-file-segments' :return: eal param string, eg: @@ -334,12 +341,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