DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] dts: add send_packets to test_suite
@ 2024-09-25 18:36 jspewock
  2024-09-26  9:56 ` Juraj Linkeš
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: jspewock @ 2024-09-25 18:36 UTC (permalink / raw)
  To: probb, juraj.linkes, paul.szczepanek, yoan.picchi, thomas,
	wathsala.vithanage, Honnappa.Nagarahalli, alex.chapman,
	Luca.Vizzarro, npratte
  Cc: dev, Jeremy Spewock

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.

Depends-on: patch-144440 ("dts: rework packet addressing")

Signed-off-by: Jeremy Spewock <jspewock@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 69388ff5ab..8945663bae 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


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

* Re: [PATCH v1] dts: add send_packets to test_suite
  2024-09-25 18:36 [PATCH v1] dts: add send_packets to test_suite jspewock
@ 2024-09-26  9:56 ` Juraj Linkeš
  2024-09-26 18:09   ` Jeremy Spewock
  2024-09-26 12:59 ` Patrick Robb
  2024-09-26 16:36 ` Patrick Robb
  2 siblings, 1 reply; 5+ messages in thread
From: Juraj Linkeš @ 2024-09-26  9:56 UTC (permalink / raw)
  To: jspewock, probb, paul.szczepanek, yoan.picchi, thomas,
	wathsala.vithanage, Honnappa.Nagarahalli, alex.chapman,
	Luca.Vizzarro, npratte
  Cc: dev



On 25. 9. 2024 20:36, jspewock@iol.unh.edu wrote:
> 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.
> 
> Depends-on: patch-144440 ("dts: rework packet addressing")

This could be in the same series. I wanted this to be in a different 
patch, but both patches could (and should) be in the same series.

> 
> Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> ---

The Depends-on: tag should be here, below the three hyphens. [0]

[0] https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies

Other than that,
Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>



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

* Re: [PATCH v1] dts: add send_packets to test_suite
  2024-09-25 18:36 [PATCH v1] dts: add send_packets to test_suite jspewock
  2024-09-26  9:56 ` Juraj Linkeš
@ 2024-09-26 12:59 ` Patrick Robb
  2024-09-26 16:36 ` Patrick Robb
  2 siblings, 0 replies; 5+ messages in thread
From: Patrick Robb @ 2024-09-26 12:59 UTC (permalink / raw)
  To: jspewock
  Cc: juraj.linkes, paul.szczepanek, yoan.picchi, thomas,
	wathsala.vithanage, Honnappa.Nagarahalli, alex.chapman,
	Luca.Vizzarro, npratte, dev

[-- Attachment #1: Type: text/plain, Size: 46 bytes --]

Reviewed-by: Patrick Robb <probb@iol.unh.edu>

[-- Attachment #2: Type: text/html, Size: 112 bytes --]

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

* Re: [PATCH v1] dts: add send_packets to test_suite
  2024-09-25 18:36 [PATCH v1] dts: add send_packets to test_suite jspewock
  2024-09-26  9:56 ` Juraj Linkeš
  2024-09-26 12:59 ` Patrick Robb
@ 2024-09-26 16:36 ` Patrick Robb
  2 siblings, 0 replies; 5+ messages in thread
From: Patrick Robb @ 2024-09-26 16:36 UTC (permalink / raw)
  To: jspewock
  Cc: juraj.linkes, paul.szczepanek, yoan.picchi, thomas,
	wathsala.vithanage, Honnappa.Nagarahalli, alex.chapman,
	Luca.Vizzarro, npratte, dev

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]

Recheck-request: iol-mellanox-Performance

When I enabled this test on Monday I accidentally set the delta threshold
to 1.5% instead of 5%. So the accepted results window was too small and led
to this false positive test fail.

[-- Attachment #2: Type: text/html, Size: 274 bytes --]

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

* Re: [PATCH v1] dts: add send_packets to test_suite
  2024-09-26  9:56 ` Juraj Linkeš
@ 2024-09-26 18:09   ` Jeremy Spewock
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Spewock @ 2024-09-26 18:09 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: probb, paul.szczepanek, yoan.picchi, thomas, wathsala.vithanage,
	Honnappa.Nagarahalli, alex.chapman, Luca.Vizzarro, npratte, dev

On Thu, Sep 26, 2024 at 5:56 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:
>
>
>
> On 25. 9. 2024 20:36, jspewock@iol.unh.edu wrote:
> > 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.
> >
> > Depends-on: patch-144440 ("dts: rework packet addressing")
>
> This could be in the same series. I wanted this to be in a different
> patch, but both patches could (and should) be in the same series.
>

Oops, I just submitted a new version of the other series before seeing
this, I will add this back into that series and resubmit.

> >
> > Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
> > ---
>
> The Depends-on: tag should be here, below the three hyphens. [0]
>
> [0] https://doc.dpdk.org/guides/contributing/patches.html#patch-dependencies
>

Ack, sorry, I always forget this.

> Other than that,
> Reviewed-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
>
>

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

end of thread, other threads:[~2024-09-26 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-25 18:36 [PATCH v1] dts: add send_packets to test_suite jspewock
2024-09-26  9:56 ` Juraj Linkeš
2024-09-26 18:09   ` Jeremy Spewock
2024-09-26 12:59 ` Patrick Robb
2024-09-26 16:36 ` Patrick Robb

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