DPDK patches and discussions
 help / color / mirror / Atom feed
From: jspewock@iol.unh.edu
To: alex.chapman@arm.com, wathsala.vithanage@arm.com,
	thomas@monjalon.net, probb@iol.unh.edu,
	juraj.linkes@pantheon.tech, Honnappa.Nagarahalli@arm.com,
	Luca.Vizzarro@arm.com, paul.szczepanek@arm.com,
	yoan.picchi@foss.arm.com, npratte@iol.unh.edu
Cc: dev@dpdk.org, Jeremy Spewock <jspewock@iol.unh.edu>
Subject: [PATCH v5 2/2] dts: add send_packets to test_suite
Date: Thu, 26 Sep 2024 14:18:28 -0400	[thread overview]
Message-ID: <20240926181828.15037-3-jspewock@iol.unh.edu> (raw)
In-Reply-To: <20240926181828.15037-1-jspewock@iol.unh.edu>

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

Currently the only methods provided in the test suite class for sending
packets capture the resulting received traffic after sending. There is,
in some cases, a need to send multiple packets at once while not really
needing to capture any of said received traffic. It is favorable to
avoid capturing received traffic when you don't need it since not all
traffic generators will necessarily be capturing traffic generators.
The method to fulfill this need exists in the traffic generator
already, but this patch exposes the method to test suites.

Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Patrick Robb <probb@iol.unh.edu>
---
 dts/framework/test_suite.py            | 12 ++++++++++++
 dts/framework/testbed_model/tg_node.py |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
index b2d8de99e7..159071d0e2 100644
--- a/dts/framework/test_suite.py
+++ b/dts/framework/test_suite.py
@@ -234,6 +234,18 @@ def send_packets_and_capture(
             duration,
         )
 
+    def send_packets(
+        self,
+        packets: list[Packet],
+    ) -> None:
+        """Send packets using the traffic generator and do not capture received traffic.
+
+        Args:
+            packets: Packets to send.
+        """
+        packets = self._adjust_addresses(packets)
+        self.tg_node.send_packets(packets, self._tg_port_egress)
+
     def get_expected_packet(self, packet: Packet) -> Packet:
         """Inject the proper L2/L3 addresses into `packet`.
 
diff --git a/dts/framework/testbed_model/tg_node.py b/dts/framework/testbed_model/tg_node.py
index 19b5b6e74c..4179365abb 100644
--- a/dts/framework/testbed_model/tg_node.py
+++ b/dts/framework/testbed_model/tg_node.py
@@ -83,6 +83,15 @@ def send_packets_and_capture(
             duration,
         )
 
+    def send_packets(self, packets: list[Packet], port: Port):
+        """Send packets without capturing resulting received packets.
+
+        Args:
+            packets: Packets to send.
+            port: Port to send the packets on.
+        """
+        self.traffic_generator.send_packets(packets, port)
+
     def close(self) -> None:
         """Free all resources used by the node.
 
-- 
2.46.0


  parent reply	other threads:[~2024-09-26 18:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 15:28 [PATCH v1 0/1] dts: adjust packet addressing and sending jspewock
2024-09-04 15:28 ` [PATCH v1 1/1] dts: add send_packets to test suites and rework packet addressing jspewock
2024-09-09 19:43   ` Dean Marx
2024-09-12 12:35   ` Patrick Robb
2024-09-20 18:08 ` [PATCH v2 0/1] dts: adjust packet addressing and sending jspewock
2024-09-20 18:08   ` [PATCH v2 1/1] dts: add send_packets to test suites and rework packet addressing jspewock
2024-09-24 14:30     ` Juraj Linkeš
2024-09-25 16:09       ` Jeremy Spewock
2024-09-26  7:52         ` Juraj Linkeš
2024-09-26 10:13         ` Juraj Linkeš
2024-09-25 18:21 ` [PATCH v3 0/1] dts: adjust " jspewock
2024-09-25 18:21   ` [PATCH v3 1/1] dts: rework " jspewock
2024-09-26 12:30     ` Juraj Linkeš
2024-09-26 17:02       ` Jeremy Spewock
2024-09-26 18:06 ` [PATCH v4 0/1] dts: adjust " jspewock
2024-09-26 18:06   ` [PATCH v4 1/1] dts: rework " jspewock
2024-09-26 18:18 ` [PATCH v5 0/2] dts: adjust packet addressing and add send_packets to test_suite jspewock
2024-09-26 18:18   ` [PATCH v5 1/2] dts: rework packet addressing jspewock
2024-09-27  9:46     ` Juraj Linkeš
2024-09-27 11:46     ` Luca Vizzarro
2024-09-26 18:18   ` jspewock [this message]
2024-09-27 11:46     ` [PATCH v5 2/2] dts: add send_packets to test_suite Luca Vizzarro

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=20240926181828.15037-3-jspewock@iol.unh.edu \
    --to=jspewock@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Luca.Vizzarro@arm.com \
    --cc=alex.chapman@arm.com \
    --cc=dev@dpdk.org \
    --cc=juraj.linkes@pantheon.tech \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=thomas@monjalon.net \
    --cc=wathsala.vithanage@arm.com \
    --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).