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 BAE324584D; Fri, 23 Aug 2024 14:22:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 768CF432FC; Fri, 23 Aug 2024 14:22:42 +0200 (CEST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mails.dpdk.org (Postfix) with ESMTP id B9A05432F6 for ; Fri, 23 Aug 2024 14:22:39 +0200 (CEST) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a868b739cd9so240527366b.2 for ; Fri, 23 Aug 2024 05:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1724415759; x=1725020559; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QpCMZtoEJBpMvN8DwfIrxDycfwwv/dKFrEpceE6BeBw=; b=IgGSXbBeyWbO4hpIcz08yW9k/acWpX3BfY5EyZP5PfGmx5KNwqtGKtNAm+rJxHTSI2 /qwtdmng2xeX6HPCzvqPv0w1011yDSlxhthxaxtYm1A6kMH48LwLiDGg0K2elB0UCJbj wxkTFjz83YpzKFtgn3yisLuVrmdDt+7IXGjGNObv3t8milrZETZnAs7sktzcKfkmo3L8 PwXVbM5tqHWOIr9mCtUE5yczK7ILYeWJaWZ5rROACSKuZE7RmXxswVmyONWbJZUETjZv h/HUlE4RS7QYZiKQBqWVvMo9tL+bfzligQE1ZTk8L///dQRe0isHgQ6hiM8dmw/rCNT9 EnIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724415759; x=1725020559; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QpCMZtoEJBpMvN8DwfIrxDycfwwv/dKFrEpceE6BeBw=; b=RBxMLu41EieyHrh5CZrVLjB2F8MT42Fca8SAIi6swbDUkAaL6He/9IQwlUB4MUTX6O pestXZGL9n61V48XfCP/MlqRXpYdc2oRMB9SewYZy5gBI+JfwCEv3uyJe0Nl9FP4Crlt z+ZfNPFthyl6qhij0DWOe/vl5FJzFpRA47vZzG7PxXeu1S0eGHeALRx6TKTH9w8RTaIO cEHiugBxij5hZRvCkdevu7F7cuKSIBINAfWQj7SN6QyzB+MINDgdVqOOBlcPg8mOI1ZT HtK23Vg+aZSxf8eOiMNF3wBPsASM7X/nQ20VfOugB44lFC+opSn59JgFVsjyJjIZAQlw UDjg== X-Forwarded-Encrypted: i=1; AJvYcCUyNbH/y1WICHUzt80E8LLvA3c6wxtrgKsHBn7StqU/CqIVR8WrNyMnYglZtVtyro1MBpI=@dpdk.org X-Gm-Message-State: AOJu0Yz/hPTtGA4C64mZQNZ8FONBoBhJYXCU0BUdmqj8hT2NjXMScDpI ogts739jbxjohMrNmAj8tXUgelpMLrePppAhN4jYlWe82Jo1Ph+/UzL+4kQ1YDE= X-Google-Smtp-Source: AGHT+IEX0qZG3/Awe+nWTmYGg1aLY/qzHdqSJYVdAxNklUWQ2Bu5wHuZNChUyVFYSCZz7hNhoZYZ/A== X-Received: by 2002:a17:906:f5a7:b0:a7a:ab8a:380 with SMTP id a640c23a62f3a-a86a54beddbmr128804766b.69.1724415759226; Fri, 23 Aug 2024 05:22:39 -0700 (PDT) Received: from [192.168.200.22] ([84.245.121.107]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f2b0765sm252345366b.75.2024.08.23.05.22.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Aug 2024 05:22:39 -0700 (PDT) Message-ID: <9b9a7993-bb7a-4293-90b9-d50a8a6727ce@pantheon.tech> Date: Fri, 23 Aug 2024 14:22:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/5] dts: add testpmd set ports queues To: Luca Vizzarro , 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> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240806124642.2580828-6-luca.vizzarro@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 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. 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. > + > + 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. >