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 4D89845920; Fri, 6 Sep 2024 18:53:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3FA342FF3; Fri, 6 Sep 2024 18:53:26 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id A212642FCB for ; Fri, 6 Sep 2024 18:53:23 +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 5DF67FEC; Fri, 6 Sep 2024 09:53:50 -0700 (PDT) Received: from [10.57.17.223] (unknown [10.57.17.223]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 419483F73B; Fri, 6 Sep 2024 09:53:22 -0700 (PDT) Message-ID: Date: Fri, 6 Sep 2024 17:53:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/5] dts: add testpmd set ports queues Content-Language: en-GB To: =?UTF-8?Q?Juraj_Linke=C5=A1?= , dev@dpdk.org Cc: Jeremy Spewock , Honnappa Nagarahalli , Paul Szczepanek References: <20240806121417.2567708-1-Luca.Vizzarro@arm.com> <20240806124642.2580828-1-luca.vizzarro@arm.com> <20240806124642.2580828-6-luca.vizzarro@arm.com> <9b9a7993-bb7a-4293-90b9-d50a8a6727ce@pantheon.tech> From: Luca Vizzarro In-Reply-To: <9b9a7993-bb7a-4293-90b9-d50a8a6727ce@pantheon.tech> Content-Type: text/plain; charset=UTF-8; format=flowed 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 On 23/08/2024 13:22, Juraj Linkeš wrote: > > > On 6. 8. 2024 14:46, Luca Vizzarro wrote: >> 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 ca24b28070..85fbc42696 100644 >> --- a/dts/framework/remote_session/testpmd_shell.py >> +++ b/dts/framework/remote_session/testpmd_shell.py >> @@ -805,6 +805,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") > > I don't think we have talked about the message formatting policy, so > here's a suggestion: Let's end all exception messages with a dot. This > could probably extend to log messages as well. Thomas mentioned in the > past that it reads better and I concur - it is an actual sentence. I gathered the same too, so this was an unvoluntary miss. > Also, this being an InternalError, do you think the invalid input could > only happen because of something going wrong in DTS? This seems > reasonable from the possible usecases. Yes, this is just input sanity check. The only case this would fail is if the callee of this function supplied the wrong value, and that would be a bug in DTS.