[PATCH 5/5] dts: add testpmd set ports queues
Luca Vizzarro
Luca.Vizzarro at arm.com
Tue Aug 6 14:14:17 CEST 2024
From: Luca Vizzarro <luca.vizzarro at arm.com>
Add a facility to update the number of TX/RX queues during the runtime
of testpmd.
Signed-off-by: Luca Vizzarro <luca.vizzarro at arm.com>
Reviewed-by: Paul Szczpanek <paul.szczepanek at arm.com>
---
dts/framework/remote_session/testpmd_shell.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index 293c7b9dff..40e850502c 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -803,6 +803,22 @@ def start_all_ports(self, verify: bool = True) -> None:
self.ports_started = True
+ @requires_stopped_ports
+ def set_ports_queues(self, number_of: int) -> None:
+ """Sets the number of queues per port.
+
+ Args:
+ number_of: The number of RX/TX queues to create per port.
+
+ Raises:
+ InternalError: If `number_of` is invalid.
+ """
+ if number_of < 1:
+ raise InternalError("The number of queues must be positive and non-zero")
+
+ self.send_command(f"port config all rxq {number_of}")
+ self.send_command(f"port config all txq {number_of}")
+
def show_port_info_all(self) -> list[TestPmdPort]:
"""Returns the information of all the ports.
--
2.34.1
More information about the dev
mailing list