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 47B3C4411E; Fri, 31 May 2024 18:37:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3903A402C9; Fri, 31 May 2024 18:37:46 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id EC2E1402C9 for ; Fri, 31 May 2024 18:37:44 +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 B45261063; Fri, 31 May 2024 09:38:08 -0700 (PDT) Received: from [10.1.39.25] (FVFG51LCQ05N.cambridge.arm.com [10.1.39.25]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D9D923F792; Fri, 31 May 2024 09:37:42 -0700 (PDT) Message-ID: Date: Fri, 31 May 2024 17:37:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/4] dts: improve starting and stopping interactive shells Content-Language: en-GB To: jspewock@iol.unh.edu, juraj.linkes@pantheon.tech, paul.szczepanek@arm.com, wathsala.vithanage@arm.com, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, yoan.picchi@foss.arm.com, npratte@iol.unh.edu, thomas@monjalon.net Cc: dev@dpdk.org References: <20240514201436.2496-1-jspewock@iol.unh.edu> <20240530163339.14566-1-jspewock@iol.unh.edu> <20240530163339.14566-2-jspewock@iol.unh.edu> From: Luca Vizzarro In-Reply-To: <20240530163339.14566-2-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 30/05/2024 17:33, jspewock@iol.unh.edu wrote: > @@ -93,17 +102,39 @@ def __init__( > def _start_application(self, get_privileged_command: Callable[[str], str] | None) -> None: > """Starts a new interactive application based on the path to the app. > > - This method is often overridden by subclasses as their process for > - starting may look different. > + This method is often overridden by subclasses as their process for starting may look > + different. Initialization of the shell on the host can be retried up to 5 times. This is > + done because some DPDK applications need slightly more time after exiting their script to > + clean up EAL before others can start. > + > + When the application is started we also bind a class for finalization to this instance of > + the shell to ensure proper cleanup of the application. > > Args: > get_privileged_command: A function (but could be any callable) that produces > the version of the command with elevated privileges. > """ > + self._finalizer = weakref.finalize(self, self._close) > + max_retries = 5 > + self._ssh_channel.settimeout(1) This timeout being too short is causing the testpmd shell (which is still loading in my case) to be spammed with testpmd instantiation commands. Unfortunately causing the next commands to fail too, as the testpmd shell has received a lot of garbage. 5 seconds of timeout seemed to have worked just fine in my case. > start_command = f"{self.path} {self._app_args}" > if get_privileged_command is not None: > start_command = get_privileged_command(start_command)