diff options
| author | Luca Vizzarro <[email protected]> | 2024-09-09 12:01:58 +0100 |
|---|---|---|
| committer | Juraj Linkeš <[email protected]> | 2024-09-09 17:44:25 +0200 |
| commit | 07816ead4d1f660663aa9077b931ffb35f053a82 (patch) | |
| tree | 5003e088fb8a53185fea68258644244d537752ca /dts/framework/remote_session/testpmd_shell.py | |
| parent | 2ecfd1267a070ccf13c3f43841e14e62289acc1e (diff) | |
dts: add testpmd set ports queues
Add a facility to update the number of TX/RX queues during the runtime
of testpmd.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Diffstat (limited to 'dts/framework/remote_session/testpmd_shell.py')
| -rw-r--r-- | dts/framework/remote_session/testpmd_shell.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index fa818d7181..30de862e64 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -813,6 +813,22 @@ class TestPmdShell(DPDKShell): 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. |
