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 8FDE243357; Fri, 17 Nov 2023 18:13:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A596402EA; Fri, 17 Nov 2023 18:13:38 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 3CDD840285 for ; Fri, 17 Nov 2023 18:13:37 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2809a824bbbso1735592a91.3 for ; Fri, 17 Nov 2023 09:13:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1700241216; x=1700846016; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wF0gm4RbHIbsbXltslStXKf4MekFhPEN7dXj86AGgLo=; b=PyVUlj4WfGR5ZZwJg5gGFPSxVQtOIExE13jD9zZc2WdwDGP44IlShAHyna0Y64tzsb AfwInHB74sjs4+YmoZlpJ7j76CspzXHz3PE09ZS8R+oMLvsGwyXGHGfZAOCbxI2tlY+A TlnINEk5PH2zRL4fKXUfM+/z3QSF8GC/7A4eY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700241216; x=1700846016; h=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=wF0gm4RbHIbsbXltslStXKf4MekFhPEN7dXj86AGgLo=; b=wWTlgN5oRBRC/0Lfo8uDhJAwb2W5QkolULOlJiG7Gj0cJydKlupRJK7yo4tu4GvB++ vxhQ44Q38wZKbWHbXrCgXXApKM2xiI1tTfvKMVzRWhgx4HjbayUUVI+MnN/CLDv/nBjQ CXN12WOQlJ1t/XbSCT457InOLZzQIJO/cYQVu8JE44eP/2lAWc0i84MIwRhh6vAldu2+ qdU7kySxi76O3Uaf1dyNLHNrbTZxg1sOCwUMxeHNaWVJKLBxTK6OcnL+r7kiDaVVlMSi uZqsaCLEXb9gLhLR/NGcxJFBBPkOtSfHu98AUET4P4182Cn/omzvdXDZD2UYhgTwgd3g QAiQ== X-Gm-Message-State: AOJu0YzgVPUQ24pzpQUEkBksGPAiT8zsa7prlG2lWy2fr07niXn/21pV RyJFNBhhNg+NBu8fk9JILhW9ClBEf+HKZcw+uLt/7Q== X-Google-Smtp-Source: AGHT+IElTiV8325H7WWBrGTbo4PTGxkQsQ9BvQRu97enhA8yuv68fZb1S4mF3zo4I/JiCviUW1doLCqOMEIFtfJTW10= X-Received: by 2002:a17:90b:1647:b0:27d:8d42:6def with SMTP id il7-20020a17090b164700b0027d8d426defmr82573pjb.34.1700241216298; Fri, 17 Nov 2023 09:13:36 -0800 (PST) MIME-Version: 1.0 References: <20231113202833.12900-1-jspewock@iol.unh.edu> <20231113202833.12900-7-jspewock@iol.unh.edu> In-Reply-To: From: Jeremy Spewock Date: Fri, 17 Nov 2023 12:13:25 -0500 Message-ID: Subject: Re: [PATCH v3 6/7] dts: add pci addresses to EAL parameters To: =?UTF-8?Q?Juraj_Linke=C5=A1?= 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, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000bafb06060a5c412b" 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 --000000000000bafb06060a5c412b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 1:10=E2=80=AFPM Juraj Linke=C5=A1 wrote: > On Mon, Nov 13, 2023 at 9:28=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 | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/dts/framework/testbed_model/sut_node.py > b/dts/framework/testbed_model/sut_node.py > > index bcac939e72..f9c7bd9bf3 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], > > Please add this to the docstring. > > This overlaps with the docstrings patch. I guess we'll need to modify > one of the patches when the other one gets merged. > Right, this would probably get a little weird with the conflict if one gets merged before the other. Another option could be copying your docstring over into this patch as well which might clean it up, but it would sort of be out of place in this patch. I'll add in the current format for now and we can change one or the other depending on the order to make sure it applies. > > other_eal_param: str, > > ): > > """ > > @@ -56,6 +58,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: > > @@ -65,6 +68,7 @@ def __str__(self) -> str: > > f"{self._prefix} " > > f"{self._no_pci} " > > f"{self._vdevs} " > > + f"{self._ports} " > > f"{self._other_eal_param}" > > ) > > > > @@ -308,6 +312,7 @@ def create_eal_parameters( > > append_prefix_timestamp: bool =3D True, > > no_pci: bool =3D False, > > vdevs: list[VirtualDevice] =3D None, > > + ports: list[Port] | None =3D None, > > Same here. > Good catch, I will do the same here. > > > other_eal_param: str =3D "", > > ) -> "EalParameters": > > """ > > @@ -350,12 +355,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.42.0 > > > --000000000000bafb06060a5c412b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 16, 2023 at 1:10=E2=80=AFP= M Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech> wrote:
On Mon, Nov 13, 2023 at 9:28= =E2=80=AFPM <j= spewock@iol.unh.edu> wrote:
>
> From: Jeremy Spewock <jspewock@iol.unh.edu>
>
> 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 <jspewock@iol.unh.edu>
> ---
>=C2=A0 dts/framework/testbed_model/sut_node.py | 9 +++++++++
>=C2=A0 1 file changed, 9 insertions(+)
>
> diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/t= estbed_model/sut_node.py
> index bcac939e72..f9c7bd9bf3 100644
> --- a/dts/framework/testbed_model/sut_node.py
> +++ b/dts/framework/testbed_model/sut_node.py
> @@ -20,6 +20,7 @@
>=C2=A0 from framework.utils import MesonArgs
>
>=C2=A0 from .hw import LogicalCoreCount, LogicalCoreList, VirtualDevice=
> +from .hw.port import Port
>=C2=A0 from .node import Node
>
>
> @@ -31,6 +32,7 @@ def __init__(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 prefix: str,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 no_pci: bool,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vdevs: list[VirtualDevice],
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ports: list[Port],

Please add this to the docstring.

This overlaps with the docstrings patch. I guess we'll need to modify one of the patches when the other one gets merged.
Right, this would probably get a little weird with the conflict if one= gets merged before the other. Another option could be copying your docstri= ng over into this patch as well which might clean it up, but it would sort = of be out of place in this patch. I'll add in the current format for no= w and we can change one or the other depending on the order to make sure it= applies.


>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 other_eal_param: str,
>=C2=A0 =C2=A0 =C2=A0 ):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 """
> @@ -56,6 +58,7 @@ def __init__(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._prefix =3D f&quo= t;--file-prefix=3D{prefix}"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._no_pci =3D "--no-pci"= ; if no_pci else ""
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._vdevs =3D " ".join(f= "--vdev {vdev}" for vdev in vdevs)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 self._ports =3D " ".join(f"= ;-a {port.pci}" for port in ports)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._other_eal_param =3D other_eal_= param
>
>=C2=A0 =C2=A0 =C2=A0 def __str__(self) -> str:
> @@ -65,6 +68,7 @@ def __str__(self) -> str:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f"{self._prefix} = "
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f"{self._no_pci} = "
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f"{self._vdevs} &= quot;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f"{self._ports} "=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f"{self._other_ea= l_param}"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
>
> @@ -308,6 +312,7 @@ def create_eal_parameters(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 append_prefix_timestamp: bool =3D Tr= ue,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 no_pci: bool =3D False,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vdevs: list[VirtualDevice] =3D None,=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 ports: list[Port] | None =3D None,

Same here.

Good catch, I will do the same here= .
=C2=A0

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 other_eal_param: str =3D ""= ;,
>=C2=A0 =C2=A0 =C2=A0 ) -> "EalParameters":
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 """
> @@ -350,12 +355,16 @@ def create_eal_parameters(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if vdevs is None:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vdevs =3D []
>
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 if ports is None:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ports =3D self.ports
> +
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return EalParameters(
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 lcore_list=3Dlcore_lis= t,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 memory_channels=3Dself= .config.memory_channels,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 prefix=3Dprefix,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 no_pci=3Dno_pci,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vdevs=3Dvdevs,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ports=3Dports,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 other_eal_param=3Dothe= r_eal_param,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
>
> --
> 2.42.0
>
--000000000000bafb06060a5c412b--