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 0B05345CA4; Thu, 7 Nov 2024 20:05:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D47D542F83; Thu, 7 Nov 2024 20:05:07 +0100 (CET) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 8DB6A42EBF for ; Thu, 7 Nov 2024 20:05:06 +0100 (CET) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2fb5014de17so746811fa.2 for ; Thu, 07 Nov 2024 11:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1731006306; x=1731611106; 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=09rAZwJSCDaM2TjomLW40ew7r4zMFg3NEFFqq63BYVs=; b=bXxgu3QfZGYIY7clrSmulk3LPM7E0LaFLmCETP5pWXhJIFaoJbwsQqFl3Vk13Xo5Y2 VBN8IjTvM1YaeA6K84ziRduZRo3c3NA7i/CisUHVz4BoLIEuAUjgHiW5mBjwNcnT2Btm QqFihAaFkA2K57ui7MRjrgQg1W35qIp81ByPU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731006306; x=1731611106; 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=09rAZwJSCDaM2TjomLW40ew7r4zMFg3NEFFqq63BYVs=; b=LN2h/xCk0cvhkqh9zeXnZXHRDC/rkPSfo1J8NfDhJkbs3/YYxK0OomYQLtgXF4+YRc F04iz9YkJU0U+Q6mCbOYlozo2TydCehwfF7JcThrINcZqHBokDXoVmdBZYPZyerUX97r mlBxrZZ6v/r7hAkP2HY+GOxp9k5Zv9eiYeRh2KH+b0OJnrMXcdPLvjkAgb0plJkjQVYf HRvmvKVIDGvjM7CR+u4kjq+NyhhL8RsWF3stCiGwo1c6TmL9hXVTJGLuhzD2Q6mkt/1s C4++IqGua8Jq7YdPTvLfBy7v94B9vu8moM+4IIIMp3xd+zHHXcUoFyw/K7RLIucO3lmY 3aPg== X-Gm-Message-State: AOJu0Yx8HNpja5dUyZoEZ77zR/BoYyMryRT7tlj9o2vnO2hdUK4eDNSB QKPqOs85wzou5077t1jiYdfWlip6YP4cR+w05l3SapwtRW6jEdXIoYbNIxiNJKDefWMbqV91Jkw 91XEPS7xDNuf5eLX2iY37+vW0YR1qq8QfZ/242g== X-Google-Smtp-Source: AGHT+IF6oaZTaWny9kcgW/hspeIG0S+2K6Jun06RRmdADcou4GqBgZcdekPgIYozJqtTMBIe/IfOe6l3X7AaPHtuUPk= X-Received: by 2002:a2e:a548:0:b0:2fb:5ddd:9421 with SMTP id 38308e7fff4ca-2ff2016f187mr139041fa.4.1731006305750; Thu, 07 Nov 2024 11:05:05 -0800 (PST) MIME-Version: 1.0 References: <20240625123611.1474204-1-luca.vizzarro@arm.com> <20241107135654.4121761-1-luca.vizzarro@arm.com> <20241107135654.4121761-2-luca.vizzarro@arm.com> In-Reply-To: <20241107135654.4121761-2-luca.vizzarro@arm.com> From: Nicholas Pratte Date: Thu, 7 Nov 2024 14:04:54 -0500 Message-ID: Subject: Re: [PATCH v2 1/2] dts: add blocked ports to EalParams To: Luca Vizzarro Cc: dev@dpdk.org, Paul Szczepanek , Patrick Robb 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 Hi Luca, this looks good to me! The only thing that needs to be fixed is the attributes component of the docstring for EalParams in eal.py. Aside from that: Reviewed-by: Nicholas Pratte On Thu, Nov 7, 2024 at 9:00=E2=80=AFAM Luca Vizzarro wrote: > > Make the "ports" attribute of EalParams as it actually is to > "allowed_ports", and add "blocked_ports". > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > dts/framework/params/eal.py | 6 +++++- > dts/framework/params/types.py | 3 ++- > dts/framework/remote_session/dpdk_shell.py | 4 ++-- > dts/framework/remote_session/testpmd_shell.py | 2 +- > 4 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/dts/framework/params/eal.py b/dts/framework/params/eal.py > index cf1594353a..71bc781eab 100644 > --- a/dts/framework/params/eal.py > +++ b/dts/framework/params/eal.py > @@ -45,9 +45,13 @@ class EalParams(Params): > vdevs: list[VirtualDevice] | None =3D field( > default=3DNone, metadata=3DParams.multiple() | Params.long("vdev= ") > ) > - ports: list[Port] | None =3D field( > + allowed_ports: list[Port] | None =3D field( > default=3DNone, > metadata=3DParams.convert_value(_port_to_pci) | Params.multiple(= ) | Params.short("a"), > ) > + blocked_ports: list[Port] | None =3D field( > + default=3DNone, > + metadata=3DParams.convert_value(_port_to_pci) | Params.multiple(= ) | Params.short("b"), > + ) > other_eal_param: Params | None =3D None > _separator: Literal[True] =3D field(default=3DTrue, init=3DFalse, me= tadata=3DParams.short("-")) > diff --git a/dts/framework/params/types.py b/dts/framework/params/types.p= y > index d77c4625fb..87d11502e8 100644 > --- a/dts/framework/params/types.py > +++ b/dts/framework/params/types.py > @@ -50,7 +50,8 @@ class EalParamsDict(TypedDict, total=3DFalse): > prefix: str > no_pci: Switch > vdevs: list[VirtualDevice] | None > - ports: list[Port] | None > + allowed_ports: list[Port] | None > + blocked_ports: list[Port] | None > other_eal_param: Params | None > > > diff --git a/dts/framework/remote_session/dpdk_shell.py b/dts/framework/r= emote_session/dpdk_shell.py > index b39132cc42..82fa4755f0 100644 > --- a/dts/framework/remote_session/dpdk_shell.py > +++ b/dts/framework/remote_session/dpdk_shell.py > @@ -56,8 +56,8 @@ def compute_eal_params( > sut_node.dpdk_prefix_list.append(prefix) > params.prefix =3D prefix > > - if params.ports is None: > - params.ports =3D sut_node.ports > + if params.allowed_ports is None: > + params.allowed_ports =3D sut_node.ports > > return params > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index 8a45a5231b..221465f6fb 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -1465,7 +1465,7 @@ def start(self, verify: bool =3D True) -> None: > self._logger.debug(f"Failed to start packet forwarding: = \n{start_cmd_output}") > raise InteractiveCommandExecutionError("Testpmd failed t= o start packet forwarding.") > > - number_of_ports =3D len(self._app_params.ports or []) > + number_of_ports =3D len(self._app_params.allowed_ports or []= ) > for port_id in range(number_of_ports): > if not self.wait_link_status_up(port_id): > raise InteractiveCommandExecutionError( > -- > 2.43.0 >