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 CD38445949; Mon, 9 Sep 2024 13:04:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0858540E24; Mon, 9 Sep 2024 13:03:46 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id EC10840E17 for ; Mon, 9 Sep 2024 13:03:42 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1DAA6FEC; Mon, 9 Sep 2024 04:04:11 -0700 (PDT) Received: from localhost.localdomain (JR4XG4HTQC.cambridge.arm.com [10.1.25.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BA3CE3F73B; Mon, 9 Sep 2024 04:03:41 -0700 (PDT) From: Luca Vizzarro To: dev@dpdk.org Cc: Honnappa Nagarahalli , Luca Vizzarro , Paul Szczepanek , =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v3 5/5] dts: add testpmd set ports queues Date: Mon, 9 Sep 2024 12:01:58 +0100 Message-Id: <20240909110158.1009592-6-luca.vizzarro@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240909110158.1009592-1-luca.vizzarro@arm.com> References: <20240806121417.2567708-1-Luca.Vizzarro@arm.com> <20240909110158.1009592-1-luca.vizzarro@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add a facility to update the number of TX/RX queues during the runtime of testpmd. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczepanek --- 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 57501eae18..5b911ce538 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -813,6 +813,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