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 C1D8745B3C; Mon, 14 Oct 2024 23:08:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D911C4060A; Mon, 14 Oct 2024 23:08:36 +0200 (CEST) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by mails.dpdk.org (Postfix) with ESMTP id E4D59402DE for ; Mon, 14 Oct 2024 23:08:34 +0200 (CEST) Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6cbcd8ce5f9so41899586d6.2 for ; Mon, 14 Oct 2024 14:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1728940114; x=1729544914; 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=TJ7S0jZPrdiAQXA+tOlVMZ9V/MOSWjOlEICenVtlrkc=; b=LhHRRlSGoh4kN/w9Ce0BIPUCwziA+2LnL17R0dZwkc7JmfMrknAva56sureoUAiOMv WmhAZ65ez2pCXKZWCJnaK0BulMKSuyyBTfkdgvPLqXlxvdabsXi8x+LU27Kcur/SyAKg V7raGaCHSlI/xG5hrk1fFEL72WXrHpi4rgNXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728940114; x=1729544914; 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=TJ7S0jZPrdiAQXA+tOlVMZ9V/MOSWjOlEICenVtlrkc=; b=GZQHuiRVx3H3djqfkigNN7JqtnltqzMAGFfHfqaHyWIysbetUsudRVv5FYJcseasxl 96+7K+UuL3wmKLnWo+GcRJnwp6zX30T5/8vVcNeCYbYovUT6SjzCa+OBZP9CoaiWghva FjFP01+hg9IMZ3obEB3tHb12jWVXc69LrgwbhvIrsa7MWfdLVTUGaZp4j/OnFIEMHQSH SlvBTlH4mEuF1uxo0wrybAaq0ssfGOVImboZk4gjU3FHM+Hu5BPl0b/M3KFEGozatwlX c2d7FK5sg6YTHmDCbl9w3oOuw+qyOvHHha4GirvKw4JZ5KjPokn+odlKdq5/67UPyqkp GqFw== X-Gm-Message-State: AOJu0YzZ3olhv/yLg1rF7KAHHlpvSfd2A4iPPIh4ZBcgs5DWkDaxgDQt TgHfWpndRtyKjW0IibRT77pina+I1eDNih/fmpOWkag0XWLG07+w4szD1UlssiI= X-Google-Smtp-Source: AGHT+IF3o0oY8hjweO7x81OGjhwlpbW3vOSg38rGOVQfzu3JP7ayAUnRAWaFfRRLtKKDvuklbSFzhw== X-Received: by 2002:a05:6214:5348:b0:6cb:eca3:b437 with SMTP id 6a1803df08f44-6cbf9e7e9e6mr153206716d6.41.1728940114137; Mon, 14 Oct 2024 14:08:34 -0700 (PDT) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe85b7a70sm49488956d6.53.2024.10.14.14.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2024 14:08:33 -0700 (PDT) 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 v3 1/2] dts: add VXLAN port method to testpmd shell Date: Mon, 14 Oct 2024 17:08:56 -0400 Message-ID: <20241014210857.31436-2-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20241014210857.31436-1-dmarx@iol.unh.edu> References: <20240823202244.9184-1-dmarx@iol.unh.edu> <20241014210857.31436-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 16b41a7814..f3238e6b6d 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -1943,6 +1943,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