From: Luca Vizzarro <luca.vizzarro@arm.com>
To: dev@dpdk.org
Cc: Paul Szczepanek <paul.szczepanek@arm.com>,
Patrick Robb <probb@iol.unh.edu>,
Luca Vizzarro <luca.vizzarro@arm.com>
Subject: [PATCH v2 1/2] dts: add blocked ports to EalParams
Date: Thu, 7 Nov 2024 13:56:53 +0000 [thread overview]
Message-ID: <20241107135654.4121761-2-luca.vizzarro@arm.com> (raw)
In-Reply-To: <20241107135654.4121761-1-luca.vizzarro@arm.com>
Make the "ports" attribute of EalParams as it actually is to
"allowed_ports", and add "blocked_ports".
Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
---
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 = field(
default=None, metadata=Params.multiple() | Params.long("vdev")
)
- ports: list[Port] | None = field(
+ allowed_ports: list[Port] | None = field(
default=None,
metadata=Params.convert_value(_port_to_pci) | Params.multiple() | Params.short("a"),
)
+ blocked_ports: list[Port] | None = field(
+ default=None,
+ metadata=Params.convert_value(_port_to_pci) | Params.multiple() | Params.short("b"),
+ )
other_eal_param: Params | None = None
_separator: Literal[True] = field(default=True, init=False, metadata=Params.short("-"))
diff --git a/dts/framework/params/types.py b/dts/framework/params/types.py
index d77c4625fb..87d11502e8 100644
--- a/dts/framework/params/types.py
+++ b/dts/framework/params/types.py
@@ -50,7 +50,8 @@ class EalParamsDict(TypedDict, total=False):
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/remote_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 = prefix
- if params.ports is None:
- params.ports = sut_node.ports
+ if params.allowed_ports is None:
+ params.allowed_ports = sut_node.ports
return params
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/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 = True) -> None:
self._logger.debug(f"Failed to start packet forwarding: \n{start_cmd_output}")
raise InteractiveCommandExecutionError("Testpmd failed to start packet forwarding.")
- number_of_ports = len(self._app_params.ports or [])
+ number_of_ports = 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
next prev parent reply other threads:[~2024-11-07 14:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 12:36 [PATCH 0/2] dts: add blocklist test suite Luca Vizzarro
2024-06-25 12:36 ` [PATCH 1/2] dts: add blocked ports to EalParams Luca Vizzarro
2024-09-09 19:17 ` Dean Marx
2024-09-11 0:13 ` Patrick Robb
2024-06-25 12:36 ` [PATCH 2/2] dts: add blocklist test suite Luca Vizzarro
2024-09-09 19:16 ` Dean Marx
2024-09-11 0:12 ` Patrick Robb
2024-11-07 13:56 ` [PATCH v2 0/2] " Luca Vizzarro
2024-11-07 13:56 ` Luca Vizzarro [this message]
2024-11-07 19:04 ` [PATCH v2 1/2] dts: add blocked ports to EalParams Nicholas Pratte
2024-11-08 14:36 ` Luca Vizzarro
2024-11-07 13:56 ` [PATCH v2 2/2] dts: add blocklist test suite Luca Vizzarro
2024-11-07 20:33 ` Nicholas Pratte
2024-11-08 14:38 ` Luca Vizzarro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241107135654.4121761-2-luca.vizzarro@arm.com \
--to=luca.vizzarro@arm.com \
--cc=dev@dpdk.org \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).