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 5E4574574D; Tue, 6 Aug 2024 14:16:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3EFC42EC4; Tue, 6 Aug 2024 14:16:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 9D64542EB9 for ; Tue, 6 Aug 2024 14:16:13 +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 C1D5C1063; Tue, 6 Aug 2024 05:16:38 -0700 (PDT) Received: from localhost.localdomain (JR4XG4HTQC.cambridge.arm.com [10.1.36.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 427873F766; Tue, 6 Aug 2024 05:16:12 -0700 (PDT) From: Luca Vizzarro To: dev@dpdk.org Cc: Jeremy Spewock , =?UTF-8?q?Juraj=20Linke=C5=A1?= , Honnappa Nagarahalli , Luca Vizzarro , Paul Szczpanek Subject: [PATCH 5/5] dts: add testpmd set ports queues Date: Tue, 6 Aug 2024 13:14:17 +0100 Message-Id: <20240806121417.2567708-7-Luca.Vizzarro@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240806121417.2567708-1-Luca.Vizzarro@arm.com> References: <20240806121417.2567708-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 From: Luca Vizzarro Add a facility to update the number of TX/RX queues during the runtime of testpmd. Signed-off-by: Luca Vizzarro Reviewed-by: Paul Szczpanek --- 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