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 6CB2346098; Wed, 15 Jan 2025 23:05:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C669402E8; Wed, 15 Jan 2025 23:05:31 +0100 (CET) Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) by mails.dpdk.org (Postfix) with ESMTP id 6280040299 for ; Wed, 15 Jan 2025 23:05:29 +0100 (CET) Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-6dccccd429eso3468406d6.3 for ; Wed, 15 Jan 2025 14:05:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1736978729; x=1737583529; 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=BYdG6roqPadpYQvcyOf9qJWpf6GHRLOcxVvAUrUB5DU=; b=PTGFhGp2EnJKZ9EArvDMeJ/qZQjdRI1cuWC/xDAz3bmj0FVm2SuNFPnkdl8DRdtSz9 H6YmYo5iazz1uqIGk9uXg4XvZhdbmyf9WMYJoEkpOb8E36UAWGRrrAjlogDvNuX01uSH xLEpAU3YE9d6El95kENu8t1dIezgEJGhl69QM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736978729; x=1737583529; 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=BYdG6roqPadpYQvcyOf9qJWpf6GHRLOcxVvAUrUB5DU=; b=cXUq/18IuiPPgdjIXTd8g1QV6OXxIC5UAJiYzzVcmSorpr4UGy+FT+5ciH4z3pjbiG whYarq6HPjsNEfYzvLYLufWUzdoBytteBLkEm4JwL+Yfc9/G9hO+PR6cI99Gsv17H8xx H8sqKNVTsG+G2WA8mblCNsvp+BUJNDeyJ7kHsC3aK3/ioM+9yPBT8pGdU+mXlhWcD/bY kwP4+BSKpVGZZPC4hbp0NSe/UnAzJuUG98emaSVvQtS5Cp3JQH1hlXVhWnPTjne6tDd2 C1E2VeI1DYN1Q5Hakh+MYtTJLx/lSXR8GCnXoshjeggq6IS5jlVsb53qgj4268oCGSsG zMdQ== X-Gm-Message-State: AOJu0YyCkSh0ez8BfR8NphnDv/+lQWZ6rjtFGp1EKMwQcfbCB8m9wWoT fzHu5xkWnrvP9GrvzslobwKu0RCsX5Y+TQ1hjXnWq76ZmZ5swEVxg2kZjVss8dQ= X-Gm-Gg: ASbGncsHNq3PNdUP/X2IRI8jD+rvBVE86rKfh+FbKzEvVhlD9ysqB1IDoG3vrKOT9gT sph5pAVAg+ITnZokCeBMsfLPRsVShbc6pZ0PR1QVYMj5cFcjpUv5gnz9KbRS3l7nIve2rsPMp5t 6dwZJJrxBP77+JnBt8HzZY1h2IkHn84I/ePZD+dutA7i2ZJm3ZFPm4WUZvY/6dF44w+VRstEkim F/zUE4iTu7VLlaoCpPivi/ehfXsaEWfpc1SEts7tzbyGQo+BSrBMAo/xiVXYbUSBL5jO22CPT0J QnFyaJufY1mf9cPB6Qyt+7rgxkg= X-Google-Smtp-Source: AGHT+IF09/CJr9cI/UUJ3IQ0+EKpSf+nQWZVV1KtI5ISgYg16O0A6ph6w+mVNGlTPI5xv2IYtG+UcQ== X-Received: by 2002:a05:6214:c25:b0:6df:99e9:39b3 with SMTP id 6a1803df08f44-6df9b1eebcdmr85660986d6.15.1736978728779; Wed, 15 Jan 2025 14:05:28 -0800 (PST) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dfade72a75sm69284806d6.70.2025.01.15.14.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2025 14:05:28 -0800 (PST) From: Dean Marx To: probb@iol.unh.edu, npratte@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com Cc: dev@dpdk.org, Dean Marx , Jeremy Spewock Subject: [PATCH v4 1/2] dts: add VXLAN port method to testpmd shell Date: Wed, 15 Jan 2025 17:05:26 -0500 Message-ID: <20250115220527.16782-2-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20250115220527.16782-1-dmarx@iol.unh.edu> References: <20241014210857.31436-1-dmarx@iol.unh.edu> <20250115220527.16782-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 Reviewed-by: Jeremy Spewock --- dts/framework/remote_session/testpmd_shell.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index aa55bd91d3..8ede47ca03 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -2083,6 +2083,27 @@ def set_verbose(self, level: int, verify: bool = True) -> None: f"Testpmd failed to set verbose level to {level}." ) + def rx_vxlan(self, vxlan_id: int, port_id: int, enable: bool, verify: bool = True) -> None: + """Add or remove vxlan id to/from filter list. + + Args: + vxlan_id: VXLAN ID to add to port filter list. + port_id: ID of the port to modify VXLAN filter of. + enable: 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 enable 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