From: Luca Vizzarro <luca.vizzarro@arm.com>
To: dev@dpdk.org
Cc: Luca Vizzarro <luca.vizzarro@arm.com>,
Paul Szczepanek <paul.szczepanek@arm.com>
Subject: [PATCH 1/2] dts: add blocked ports to EalParams
Date: Tue, 25 Jun 2024 13:36:10 +0100 [thread overview]
Message-ID: <20240625123611.1474204-2-luca.vizzarro@arm.com> (raw)
In-Reply-To: <20240625123611.1474204-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 8d7766fefc..b893d874a7 100644
--- a/dts/framework/params/eal.py
+++ b/dts/framework/params/eal.py
@@ -42,9 +42,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 e668f658d8..0a4179fdd0 100644
--- a/dts/framework/params/types.py
+++ b/dts/framework/params/types.py
@@ -49,7 +49,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 296639f37d..6b4cec2466 100644
--- a/dts/framework/remote_session/dpdk_shell.py
+++ b/dts/framework/remote_session/dpdk_shell.py
@@ -54,8 +54,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 ec22f72221..baa773ed70 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -638,7 +638,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.34.1
next prev parent reply other threads:[~2024-06-25 12:38 UTC|newest]
Thread overview: 3+ 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 ` Luca Vizzarro [this message]
2024-06-25 12:36 ` [PATCH 2/2] " 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=20240625123611.1474204-2-luca.vizzarro@arm.com \
--to=luca.vizzarro@arm.com \
--cc=dev@dpdk.org \
--cc=paul.szczepanek@arm.com \
/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).