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 0446944079; Mon, 20 May 2024 19:35:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C802A402BB; Mon, 20 May 2024 19:35:09 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 92F6F400EF for ; Mon, 20 May 2024 19:35:08 +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 0C558DA7; Mon, 20 May 2024 10:35:32 -0700 (PDT) Received: from [10.57.67.203] (unknown [10.57.67.203]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9150E3F641; Mon, 20 May 2024 10:35:06 -0700 (PDT) Message-ID: <5121cc48-3be6-45fa-9c0b-bd745cfee589@arm.com> Date: Mon, 20 May 2024 18:35:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 3/4] dts: add methods for modifying MTU to testpmd shell Content-Language: en-GB To: jspewock@iol.unh.edu, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech, probb@iol.unh.edu, wathsala.vithanage@arm.com, thomas@monjalon.net Cc: dev@dpdk.org References: <20240514201436.2496-1-jspewock@iol.unh.edu> <20240514201436.2496-4-jspewock@iol.unh.edu> From: Luca Vizzarro In-Reply-To: <20240514201436.2496-4-jspewock@iol.unh.edu> 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 14/05/2024 21:14, jspewock@iol.unh.edu wrote: > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py > index 33b3e7c5a3..4e608998f9 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -227,6 +227,74 @@ def set_forward_mode(self, mode: TestPmdForwardingModes, verify: bool = True): > f"Test pmd failed to set fwd mode to {mode.value}" > ) > > + def _stop_port(self, port_id: int, verify: bool = True) -> None: > + """Stop port `port_id` in testpmd. > + > + Depending on the PMD, the port may need to be stopped before configuration can take place. > + This method wraps the command needed to properly stop ports and take their link down. > + > + Args: > + port_id: ID of the port to take down. > + verify: If :data:`True` the output will be scanned in an attempt to verify that the > + stopping of ports was successful. Defaults to True. > + > + Raises: > + InteractiveCommandExecutionError: If `verify` is :data:'True` and the port did not just a nit: apostrophe used instead of backtick 'True`