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 E277A45825; Fri, 23 Aug 2024 22:22:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B55243387; Fri, 23 Aug 2024 22:22:28 +0200 (CEST) Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) by mails.dpdk.org (Postfix) with ESMTP id 6FAAF43379 for ; Fri, 23 Aug 2024 22:22:26 +0200 (CEST) Received: by mail-ua1-f47.google.com with SMTP id a1e0cc1a2514c-84300fc9800so623950241.1 for ; Fri, 23 Aug 2024 13:22:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1724444546; x=1725049346; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/KpUnrFbXWdbaqdrXCUCc2w7gLzOA9J8XTtUEOLKoxQ=; b=eDJcgkX3OGtRbQvrkXSust0l0gObFCDJlo+J4LKXWXK+XbGfkRf7psMoKjChQMJ7W7 KBtPO9Nlq2CPGo7g2TAWRt9RPZvvj+N0FMg/pHHoHyIV8KcsbpIeFproWxpy2CwBDze7 g6v5g/gnRz+gNQ5Cixs9cfzYSBsA/PE0kZlc0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724444546; x=1725049346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/KpUnrFbXWdbaqdrXCUCc2w7gLzOA9J8XTtUEOLKoxQ=; b=E0iLm2x7uCvAerAu9/DlGuVbIPKRacQ194iPphtwXM+t66/OKI1Vkj/N9Yb3L9wmPh mJrEdV9YBHFxv6dfgE1BViDhW/eFOZccbP7DWJ1qplaX6Hdg4eBpLdQJsBSspWYwuOXW EYoPHZMnXX9Wqe5fgfqZlz5K0xz3Lwv6baC+Tqq10fuywKiSy2+fq0ShSorWFSpug5u4 4tdjq6Tuhx0OXsjJyyiz3E8deBBzozHzsRzsdmlse/lyItUMcf/4PIoGF3sny2sX3eYR PUwREFee9hQVvMtfpKbWjanLCAxGjkmgG7IQ8kdWsEjUpwImYnlUCsT7oIOcKE8Ai6jX p3Hg== X-Gm-Message-State: AOJu0YwfbFi0fkmjY4nLEhMVhB0niye7BcdtHVUD1Sabj63J/SGlvyik nv6Z8votHOC3qRfsjo9YIWR4swW/OzgQh30W2sSt6pAGEkPH4CoXbcgNhrcqnDU= X-Google-Smtp-Source: AGHT+IGokq01NIytATAaPxMiAz8mHFcDVasPB9Ewu0fFIBVs8ehLjVX55Fnwv0OGWI8A/Fsds0J8QQ== X-Received: by 2002:a67:fb03:0:b0:498:f77f:a246 with SMTP id ada2fe7eead31-498f77fa4c8mr2777793137.29.1724444545623; Fri, 23 Aug 2024 13:22:25 -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-7a67f3d5c8csm212668485a.98.2024.08.23.13.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:22:25 -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 v2 1/2] dts: add VXLAN port method to testpmd shell Date: Fri, 23 Aug 2024 16:22:43 -0400 Message-ID: <20240823202244.9184-2-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240823202244.9184-1-dmarx@iol.unh.edu> References: <20240823193459.23026-1-dmarx@iol.unh.edu> <20240823202244.9184-1-dmarx@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 rx_vxlan_port add/rm method to testpmd shell for adding or removing a vxlan id to the specified port filter list. Signed-off-by: Dean Marx --- dts/framework/remote_session/testpmd_shell.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index 43e9f56517..00b75954ef 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -806,6 +806,29 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats: return TestPmdPortStats.parse(output) + def rx_vxlan(self, vxlan_id: int, port_id: int, add: bool, verify: bool = True) -> None: + """Add or remove vxlan id to filter list. + + Args: + vxlan_id: Number of VXLAN ID to add to port filter list. + port_id: Number of port to add VXLAN ID to. + add: If :data:`True`, adds specified VXLAN ID, otherwise removes it. + verify: If :data:`True`, the output of the command is checked to verify + the VXLAN ID was successfully added/removed from the port. + + Raises: + InteractiveCommandExecutionError: If `verify` is :data:`True` and VXLAN ID + is not successfully added or removed. + """ + action = "add" if add else "rm" + vxlan_output = self.send_command(f"rx_vxlan_port {action} {vxlan_id} {port_id}") + if verify: + if "udp tunneling add error" in vxlan_output: + self._logger.debug(f"Failed to set VXLAN:\n{vxlan_output}") + raise InteractiveCommandExecutionError( + f"Failed to set VXLAN:\n{vxlan_output}" + ) + def _close(self) -> None: """Overrides :meth:`~.interactive_shell.close`.""" self.stop() -- 2.44.0