DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dean Marx <dmarx@iol.unh.edu>
To: probb@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 <dmarx@iol.unh.edu>
Subject: [PATCH v3 2/3] dts: add method for bringing link of interface up
Date: Fri, 24 Oct 2025 13:46:59 -0400	[thread overview]
Message-ID: <20251024174702.600147-2-dmarx@iol.unh.edu> (raw)
In-Reply-To: <20251024174702.600147-1-dmarx@iol.unh.edu>

Add set_interface_link_up method to Linux Session class
for setting the link of an interface up. The existing
command most similar to this, bring_up_link, is designed
for use during topology setup within the framework,
whereas the new command is designed for use during
test suite runtime, as is needed for the virtio suite.

Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
 dts/framework/testbed_model/linux_session.py | 4 ++++
 dts/framework/testbed_model/os_session.py    | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/dts/framework/testbed_model/linux_session.py b/dts/framework/testbed_model/linux_session.py
index 1f11c3e740..bfec2f3339 100644
--- a/dts/framework/testbed_model/linux_session.py
+++ b/dts/framework/testbed_model/linux_session.py
@@ -204,6 +204,10 @@ def bring_up_link(self, ports: Iterable[Port]) -> None:
 
         del self._lshw_net_info
 
+    def set_interface_link_up(self, name: str) -> None:
+        """Overrides :meth:`~.os_session.OSSession.set_interface_link_up`."""
+        self.send_command(f"ip link set dev {name} up", privileged=True, verify=True)
+
     @cached_property
     def devbind_script_path(self) -> PurePath:
         """The path to the dpdk-devbind.py script on the node.
diff --git a/dts/framework/testbed_model/os_session.py b/dts/framework/testbed_model/os_session.py
index b41bb42205..4523679dc1 100644
--- a/dts/framework/testbed_model/os_session.py
+++ b/dts/framework/testbed_model/os_session.py
@@ -590,6 +590,14 @@ def bring_up_link(self, ports: Iterable[Port]) -> None:
             ports: The ports to apply the link up command to.
         """
 
+    @abstractmethod
+    def set_interface_link_up(self, name: str) -> None:
+        """Send operating system specific command for bringing up link on specified interface.
+
+        Args:
+            name: String representing logical name of port to apply the link up command to.
+        """
+
     @abstractmethod
     def configure_port_mtu(self, mtu: int, port: Port) -> None:
         """Configure `mtu` on `port`.
-- 
2.51.0


  reply	other threads:[~2025-10-24 17:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 20:04 [PATCH v1 1/2] dts: add start Tx first method to testpmd shell Dean Marx
2025-09-16 20:04 ` [PATCH v1 2/2] dts: add virtio forwarding test suite Dean Marx
2025-09-23 11:38   ` Luca Vizzarro
2025-10-03 18:14     ` Dean Marx
2025-10-09 13:04   ` Patrick Robb
2025-09-23 11:27 ` [PATCH v1 1/2] dts: add start Tx first method to testpmd shell Luca Vizzarro
2025-10-03 19:27 ` [PATCH v2 " Dean Marx
2025-10-03 19:27   ` [PATCH v2 2/2] dts: add virtio forwarding test suite Dean Marx
2025-10-21 15:13     ` Luca Vizzarro
2025-10-21 17:35       ` Dean Marx
2025-10-23 12:59     ` Patrick Robb
2025-10-24 18:38       ` Dean Marx
2025-10-24 17:46   ` [PATCH v3 1/3] dts: add start Tx first method to testpmd shell Dean Marx
2025-10-24 17:46     ` Dean Marx [this message]
2025-10-24 17:47     ` [PATCH v3 3/3] dts: add virtio forwarding test suite Dean Marx
2025-10-24 18:50     ` [PATCH v4 1/3] dts: add start Tx first method to testpmd shell Dean Marx
2025-10-24 18:50       ` [PATCH v4 2/3] dts: add method for bringing link of interface up Dean Marx
2025-10-24 18:50       ` [PATCH v4 3/3] dts: add virtio forwarding test suite Dean Marx

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=20251024174702.600147-2-dmarx@iol.unh.edu \
    --to=dmarx@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=luca.vizzarro@arm.com \
    --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).