From patchwork Mon Aug 12 14:23:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dean Marx X-Patchwork-Id: 143081 X-Patchwork-Delegate: juraj.linkes@pantheon.tech Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D78D6457A1; Mon, 12 Aug 2024 16:23:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7562402BB; Mon, 12 Aug 2024 16:23:40 +0200 (CEST) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by mails.dpdk.org (Postfix) with ESMTP id 8AF1C4014F for ; Mon, 12 Aug 2024 16:23:39 +0200 (CEST) Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3db50abf929so3328423b6e.2 for ; Mon, 12 Aug 2024 07:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1723472618; x=1724077418; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GbdhNvg3Ec6VorQSz7Rv9Iyd0qQfW6zVvrJSv6BPOWQ=; b=TNq0fy55nvY/qbjZkSoS79ORg8OTNtmfkDzFtr6PbdME6LLf5QLYN5Tl5/5CLNpjey OLcQ5xElgJleZ/L10it4kMr8HI1NEsk91Vw89Z4SCvxziCmmiiXw9c1drJPOk38K+FYz BAdqtmmBC2OgTdlNmQVAEaWzmYu3kxd3KH6xc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723472618; x=1724077418; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GbdhNvg3Ec6VorQSz7Rv9Iyd0qQfW6zVvrJSv6BPOWQ=; b=gVsKb3QcpoSl7YAR35zS7zJk1lwLhpVci51qFOI3e18E7zT71vYePgzLlqPRk/Tb2O o0im+YEbk2xE1aof2QZ5T0Erpe8JE3yNs+TuTyJg0PBnROM/20EIACPQ/NTJARUbb4x4 Ns+tTGxqh89l5P+e4mGQ3voXhHo+o/CdsOBClqpN2Up1Xgf0968rD7qqBQXCCqkGZC3M TTYdQLpPC8L5Re8ztuoWTNicvRK9l/gn3n9f4BWYhy2jk40KnQuI6NoCdWqlEy4yIQMQ trNW/dkVWcxohTsAmpz0+gWPCeCEJamnWssD4wecPDtdKf4RDF3YkeWlidMqNKlIEQRf XPtA== X-Gm-Message-State: AOJu0YydF2EeSK4/z9CnTGQM5Z+XFdczLeKnHKgBEPjY5l8Qh47FMxQt 5YrCB6FnmVH1ka+Ny1Feg/vmRwPPDXg+qmXSHvH5VHjt/1p6nwp46/ssidvUqkk= X-Google-Smtp-Source: AGHT+IHgdlqpDOQq+o0sDzP+OfA17DBhPEWyCAP8S/eTCG9hS7LjvdyDxYcomMDR/bN5xs651Hh2wg== X-Received: by 2002:a05:6358:7e47:b0:1af:15b5:7caa with SMTP id e5c5f4694b2df-1b19d2e7f1bmr74209355d.21.1723472618591; Mon, 12 Aug 2024 07:23:38 -0700 (PDT) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4c7e13605sm247787785a.135.2024.08.12.07.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 07:23:37 -0700 (PDT) From: Dean Marx To: probb@iol.unh.edu, npratte@iol.unh.edu, jspewock@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Dean Marx Subject: [PATCH v1] dts: add verify argument to set forward mode Date: Mon, 12 Aug 2024 10:23:55 -0400 Message-ID: <20240812142355.12532-1-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 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 Add optional verify argument to the set_forward_mode method in testpmd shell. Signed-off-by: Dean Marx --- dts/framework/remote_session/testpmd_shell.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index 43e9f56517..b8cdfc01b9 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -717,11 +717,12 @@ def set_forward_mode(self, mode: SimpleForwardingModes, verify: bool = True): fails to update. """ set_fwd_output = self.send_command(f"set fwd {mode.value}") - if f"Set {mode.value} packet forwarding mode" not in set_fwd_output: - self._logger.debug(f"Failed to set fwd mode to {mode.value}:\n{set_fwd_output}") - raise InteractiveCommandExecutionError( - f"Test pmd failed to set fwd mode to {mode.value}" - ) + if verify: + if f"Set {mode.value} packet forwarding mode" not in set_fwd_output: + self._logger.debug(f"Failed to set fwd mode to {mode.value}:\n{set_fwd_output}") + raise InteractiveCommandExecutionError( + f"Test pmd failed to set fwd mode to {mode.value}" + ) def show_port_info_all(self) -> list[TestPmdPort]: """Returns the information of all the ports.