From: Dean Marx <dmarx@iol.unh.edu>
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 <dmarx@iol.unh.edu>
Subject: [PATCH v2 1/2] dts: add VXLAN port method to testpmd shell
Date: Fri, 23 Aug 2024 16:22:43 -0400 [thread overview]
Message-ID: <20240823202244.9184-2-dmarx@iol.unh.edu> (raw)
In-Reply-To: <20240823202244.9184-1-dmarx@iol.unh.edu>
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 <dmarx@iol.unh.edu>
---
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
next prev parent reply other threads:[~2024-08-23 20:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 19:34 [PATCH v1 0/2] dts: port over unified packet type suite Dean Marx
2024-08-23 19:34 ` [PATCH v1 1/2] dts: add VXLAN port method to testpmd shell Dean Marx
2024-08-23 19:34 ` [PATCH v1 2/2] dts: port over unified packet suite Dean Marx
2024-08-23 20:22 ` [PATCH v2 0/2] dts: port over unified packet type suite Dean Marx
2024-08-23 20:22 ` Dean Marx [this message]
2024-09-04 19:23 ` [PATCH v2 1/2] dts: add VXLAN port method to testpmd shell Jeremy Spewock
2024-08-23 20:22 ` [PATCH v2 2/2] dts: port over unified packet suite Dean Marx
2024-09-04 19:23 ` Jeremy Spewock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240823202244.9184-2-dmarx@iol.unh.edu \
--to=dmarx@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=jspewock@iol.unh.edu \
--cc=juraj.linkes@pantheon.tech \
--cc=luca.vizzarro@arm.com \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).