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 33DD643866; Mon, 8 Jan 2024 16:00:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB9574027E; Mon, 8 Jan 2024 16:00:12 +0100 (CET) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mails.dpdk.org (Postfix) with ESMTP id D757640261 for ; Mon, 8 Jan 2024 16:00:10 +0100 (CET) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5574feb7958so2081716a12.3 for ; Mon, 08 Jan 2024 07:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1704726009; x=1705330809; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UuKqXxX2TuIGZ3fDBQai1qb52vqPfwpRWdNj0XWhIgQ=; b=dcIrNI7bfL+wVLiyrfib+AUSAy2E3wqZQ5h8zzdV6asAAVsdCwBSbXHRMhjPCE8RI3 VvSEQX6wHUB00PzbWpbVH/aN9KIHldlRyNsC6iqVz/efusNu979nIjUEWrzveZvDPTgl NMKVIMEoQ8G0L5KsjBkqfa21vbcKK32fICRRkFhklzfWHzcO70FPGLQrc7fs/1TRjgpj HJ84W8nOGcsSTo8q1ycA4YhZ9XC+6qZo9nutfr0/nnKAUeUFJQti2+v/u0YKS8RuiX20 ltjJdZw1smLFfl7gK9E3FJcqd5nvGUlpORcvx15ajhOO1oUlkD4EseTZtG8vD1qW+7+j WmHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726009; x=1705330809; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UuKqXxX2TuIGZ3fDBQai1qb52vqPfwpRWdNj0XWhIgQ=; b=wR+euIZQcz0+Sz8I1+rsgSuF8z1RyJPtiXJq2Zpnbx0XdHOzwi+SAA7Azk+mkAImhc /1sr9i3JuUiyNvJPoi76O+riKqNC0RLOOz3VuazLvqgT+KuSgyQkrMGYNf/Nz7Fonz4W RKIyg3VgAC3/UUD5N805447//uzyjAVzh2JjynLtC0jMtPgYoZ6hJ2KOuwDXIh+ECE+n amfc34xI2sNAXbfqpxr3p/DBYMgaA6grP8UW5f6MX9PniFCDHSFXYOuwp+bIdFxhY8d5 d/p4RVahPyWlPxBIRPPZk/xDfpVPX8efTK1n1awD5o3zuAesBPkeAYYJ7tekPKdo+nU9 Fjvw== X-Gm-Message-State: AOJu0YwOoCj1nlACjiXNiBtawCK4Lc3grpCfH3vKyn1noMMHrC9jZfVL 3TNGsg2wNrgVBH061x6EAPP8fE6Zsrscbazij+qpXrze62BtuA== X-Google-Smtp-Source: AGHT+IH+2F5msQz9Wrjaw5aI6Dqz/cErTGXFZej0iTDpsMaMj/Bgy0JXQy/gckg4cReALEfAyN8WXGnn2BfikyoXu7E= X-Received: by 2002:a17:906:10d2:b0:a28:f6a1:f0c0 with SMTP id v18-20020a17090610d200b00a28f6a1f0c0mr1524623ejv.103.1704726009631; Mon, 08 Jan 2024 07:00:09 -0800 (PST) MIME-Version: 1.0 References: <20240103221217.18954-1-jspewock@iol.unh.edu> <20240103223206.23129-1-jspewock@iol.unh.edu> <20240103223206.23129-5-jspewock@iol.unh.edu> In-Reply-To: <20240103223206.23129-5-jspewock@iol.unh.edu> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Mon, 8 Jan 2024 15:59:58 +0100 Message-ID: Subject: Re: [PATCH v6 4/7] dts: add pci addresses to EAL parameters To: jspewock@iol.unh.edu Cc: Honnappa.Nagarahalli@arm.com, 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, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Reviewed-by: Juraj Linke=C5=A1 On Wed, Jan 3, 2024 at 11:33=E2=80=AFPM wrote: > > 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/test= bed_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=3D'--single-file-segments'`` > """ > @@ -73,6 +76,7 @@ def __init__( > self._prefix =3D f"--file-prefix=3D{prefix}" > self._no_pci =3D "--no-pci" if no_pci else "" > self._vdevs =3D " ".join(f"--vdev {vdev}" for vdev in vdevs) > + self._ports =3D " ".join(f"-a {port.pci}" for port in ports) > self._other_eal_param =3D 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 =3D True, > no_pci: bool =3D False, > vdevs: list[VirtualDevice] | None =3D None, > + ports: list[Port] | None =3D None, > other_eal_param: str =3D "", > ) -> "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 port= s listed in `self.ports` > + will be allowed. > other_eal_param: user defined DPDK EAL parameters, e.g.: > ``other_eal_param=3D'--single-file-segments'``. > > @@ -388,12 +396,16 @@ def create_eal_parameters( > if vdevs is None: > vdevs =3D [] > > + if ports is None: > + ports =3D self.ports > + > return EalParameters( > lcore_list=3Dlcore_list, > memory_channels=3Dself.config.memory_channels, > prefix=3Dprefix, > no_pci=3Dno_pci, > vdevs=3Dvdevs, > + ports=3Dports, > other_eal_param=3Dother_eal_param, > ) > > -- > 2.43.0 >