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 856B643F4B; Mon, 29 Apr 2024 17:54:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07B85402A3; Mon, 29 Apr 2024 17:54:16 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id DFF0D4029C for ; Mon, 29 Apr 2024 17:54:14 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2a87bd53dc3so3824421a91.2 for ; Mon, 29 Apr 2024 08:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1714406054; x=1715010854; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g4N5+K/DX1xUKFi0A2Nbk9l3a6SwjvsCFvRzMTkcOJg=; b=FLK1/QmwQgqJFz+us61LezqH5uDZQCSBXLYEVr2m5CVpRCKhjzapJnGyi/xhtWqfHV aGv0wTZtMBtkh9g3YasEgGlRp81I70lEXxken1j0vsKqyngKUILCyre8eu73WCjJE/aL W26pmjpWj1GeTIXXT1w9tiomHEnu4vj4itUSc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714406054; x=1715010854; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g4N5+K/DX1xUKFi0A2Nbk9l3a6SwjvsCFvRzMTkcOJg=; b=ZLEXwI9Uhiz+XpAe13XUawf2D3RnhUwQluE+gRmCYuZ6NMQAgYCevFR8EMHI24n6vw r7pBZ9jGkK4b43TF1MvQrSshiNSvjFuPy+EAybpt4mJCAg/6srLHS+9u8xZss4Hl49i5 TzE16vgQ5r/qwEbSMUTKAMKj/OhqdaaxPeWGK9+K9petGfPbf8crAiu7TeiSm6b9K42a gu25oFWs3FpX1aJidFKYg5x9sKyRRIUEmJQ4W0w5aBQkW2LglB4d+yP50nhGVgbpkuBZ 4o5ze6chdX7NTiAAWsiko9DViI9ye59Um/JYE4fJDFmCVXk+S9DHq16GwS6ppAE50SMJ mF3g== X-Gm-Message-State: AOJu0YxWVaHPKFYJkbbu6rl83ZKjMlxUzRWPqFgv38PvP9lZ2+UhV9c4 +sl+k7vN2LxEVXRUl18U3Mbbzc3dag7R2QvFjn41WyQIAf1DCkIq008A7DliY3Vp7Funt4HBGhw YOsDch5vpwefEhoqz5ZMCfi4Awe2jilqBEi/Fcw== X-Google-Smtp-Source: AGHT+IHYUNbtjFplYBSnjMunDOrCLkS1gzA4h70JFBq+2u38x1rC4Ob1iQ94Uhgg86WNMxlBL4JcLzstHSvHYwS1yE4= X-Received: by 2002:a17:90a:5916:b0:2b2:1514:b79d with SMTP id k22-20020a17090a591600b002b21514b79dmr1646909pji.31.1714406054011; Mon, 29 Apr 2024 08:54:14 -0700 (PDT) MIME-Version: 1.0 References: <20240412111136.3470304-1-luca.vizzarro@arm.com> <20240412111136.3470304-6-luca.vizzarro@arm.com> In-Reply-To: <20240412111136.3470304-6-luca.vizzarro@arm.com> From: Jeremy Spewock Date: Mon, 29 Apr 2024 11:54:03 -0400 Message-ID: Subject: Re: [PATCH 5/5] dts: add `show port stats` command to TestPmdShell To: Luca Vizzarro Cc: dev@dpdk.org, =?UTF-8?Q?Juraj_Linke=C5=A1?= , Paul Szczepanek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Fri, Apr 12, 2024 at 7:11=E2=80=AFAM Luca Vizzarro wrote: > + def show_port_stats(self, port_id: int) -> TestPmdPortStats: > + """Returns the given port statistics. > + > + Args: > + port_id: The port ID to gather information for. > + > + Raises: > + InteractiveCommandExecutionError: If `port_id` is invalid. > + """ > + output =3D self.send_command(f"show port stats {port_id}") Does this also need to skip the first line in the output? > + if output.startswith("Invalid port"): > + raise InteractiveCommandExecutionError("invalid port given") > + > + return TestPmdPortStats.parse(output) > + > def close(self) -> None: > """Overrides :meth:`~.interactive_shell.close`.""" > self.send_command("quit", "") > -- > 2.34.1 >