DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/1] dts: Add the ability to bind ports to drivers
@ 2023-11-09 22:57 jspewock
  2023-11-09 22:57 ` [PATCH v2 1/1] dts: allow configuring MTU of ports jspewock
  0 siblings, 1 reply; 2+ messages in thread
From: jspewock @ 2023-11-09 22:57 UTC (permalink / raw)
  To: Honnappa.Nagarahalli, juraj.linkes, thomas, wathsala.vithanage,
	probb, paul.szczepanek, yoan.picchi
  Cc: dev, Jeremy Spewock

From: Jeremy Spewock <jspewock@iol.unh.edu>

Changes in this version address the comments on the last and change what
was necessary. Now, we no longer modprobe the driver, but the decision
was made to still make driver binding exclusive to the SUT for the time
being due to the uncertainty of what binding drivers on the traffic
generator will look like in the future when we need to do so.

I also decided to leave the os_udp test case in the patch as leaving it
does no harm really, all that is required for it to run is binding to
the os_driver before it runs and back to the DPDK driver after, and I
think it serves as somewhat of a "hello world" for ensuring that your
traffic generator is functioning. If it is decided that we no longer
want it in the future or want to make it a part of the hello_world
suite, another patch will be submitted at a later date.

v1: https://mails.dpdk.org/archives/dev/2023-November/281477.html

Jeremy Spewock (1):
  dts: allow configuring MTU of ports

 dts/framework/remote_session/linux_session.py | 7 +++++++
 dts/framework/remote_session/os_session.py    | 9 +++++++++
 2 files changed, 16 insertions(+)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2 1/1] dts: allow configuring MTU of ports
  2023-11-09 22:57 [PATCH v2 0/1] dts: Add the ability to bind ports to drivers jspewock
@ 2023-11-09 22:57 ` jspewock
  0 siblings, 0 replies; 2+ messages in thread
From: jspewock @ 2023-11-09 22:57 UTC (permalink / raw)
  To: Honnappa.Nagarahalli, juraj.linkes, thomas, wathsala.vithanage,
	probb, paul.szczepanek, yoan.picchi
  Cc: dev, Jeremy Spewock

From: Jeremy Spewock <jspewock@iol.unh.edu>

Adds methods in both os_session and linux session to allow for setting
MTU of port interfaces in an OS agnostic way.

Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
---
 dts/framework/remote_session/linux_session.py | 7 +++++++
 dts/framework/remote_session/os_session.py    | 9 +++++++++
 2 files changed, 16 insertions(+)

diff --git a/dts/framework/remote_session/linux_session.py b/dts/framework/remote_session/linux_session.py
index a3f1a6bf3b..dab68d41b1 100644
--- a/dts/framework/remote_session/linux_session.py
+++ b/dts/framework/remote_session/linux_session.py
@@ -196,6 +196,13 @@ def configure_port_ip_address(
             verify=True,
         )
 
+    def configure_port_mtu(self, mtu: int, port: Port) -> None:
+        self.send_command(
+            f"ip link set dev {port.logical_name} mtu {mtu}",
+            privileged=True,
+            verify=True,
+        )
+
     def configure_ipv4_forwarding(self, enable: bool) -> None:
         state = 1 if enable else 0
         self.send_command(f"sysctl -w net.ipv4.ip_forward={state}", privileged=True)
diff --git a/dts/framework/remote_session/os_session.py b/dts/framework/remote_session/os_session.py
index 8a709eac1c..c038f78b79 100644
--- a/dts/framework/remote_session/os_session.py
+++ b/dts/framework/remote_session/os_session.py
@@ -277,6 +277,15 @@ def configure_port_ip_address(
         Configure (add or delete) an IP address of the input port.
         """
 
+    @abstractmethod
+    def configure_port_mtu(self, mtu: int, port: Port) -> None:
+        """Configure MTU on a given port.
+
+        Args:
+            mtu: Desired MTU value.
+            port: Port to set the MTU on.
+        """
+
     @abstractmethod
     def configure_ipv4_forwarding(self, enable: bool) -> None:
         """
-- 
2.42.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-09 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 22:57 [PATCH v2 0/1] dts: Add the ability to bind ports to drivers jspewock
2023-11-09 22:57 ` [PATCH v2 1/1] dts: allow configuring MTU of ports jspewock

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).