From: Luca Vizzarro <Luca.Vizzarro@arm.com>
To: Patrick Robb <probb@iol.unh.edu>, Paul.Szczepanek@arm.com
Cc: dev@dpdk.org, dmarx@iol.unh.edu, nprattedev@gmail.com,
mmahajan@iol.unh.edu, abailey@iol.unh.edu, thomas.wilks@arm.com,
Nicholas Pratte <npratte@iol.unh.edu>
Subject: Re: [PATCH v3 5/5] dts: add performance test functions to test suite API
Date: Wed, 2 Jul 2025 17:37:54 +0100 [thread overview]
Message-ID: <6f7c2436-7b2c-4b0b-b1e0-538bce473f31@arm.com> (raw)
In-Reply-To: <20250702052154.381690-5-probb@iol.unh.edu>
On 02/07/2025 06:21, Patrick Robb wrote:
> From: Nicholas Pratte <npratte@iol.unh.edu>
>
> Provide functional performance method to run performance tests using a
> user-supplied performance traffic generator. The single core performance
> test is included, with some basic statistics checks verifying TG packet
is the test missing?
> transmission rates.
>
> Bugzilla ID: 1697
> Signed-off-by: Nicholas Pratte <npratte@iol.unh.edu>
> Signed-off-by: Patrick Robb <probb@iol.unh.edu>
> Reviewed-by: Dean Marx <dmarx@iol.unh.edu>
> ---
> dts/configurations/tests_config.example.yaml | 12 +++++++
> dts/framework/test_suite.py | 34 ++++++++++++++++++--
> 2 files changed, 43 insertions(+), 3 deletions(-)
>
> diff --git a/dts/configurations/tests_config.example.yaml b/dts/configurations/tests_config.example.yaml
> index c011ac0588..c56951b2b0 100644
> --- a/dts/configurations/tests_config.example.yaml
> +++ b/dts/configurations/tests_config.example.yaml
> @@ -3,3 +3,15 @@
> # Define the custom test suite configurations
> hello_world:
> msg: A custom hello world to you!
> +single_core_forward_perf:
> + test_parameters:
> + - frame_size: 64
> + num_descriptors: 128
> + expected_mpps: 30.1234
> + - frame_size: 64
> + num_descriptors: 128
> + expected_mpps: 30.2341
> + - frame_size: 512
> + num_descriptors: 128
> + expected_mpps: 19.453376
> + delta_tolerance: 0.05
where does this come from? Is it meant for the missing test suite?
> \ No newline at end of file
> diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
> index 75d7a6eb6c..4044c85d4d 100644
> --- a/dts/framework/test_suite.py
> +++ b/dts/framework/test_suite.py
> @@ -38,6 +38,10 @@
> CapturingTrafficGenerator,
> PacketFilteringConfig,
> )
> +from framework.testbed_model.traffic_generator.performance_traffic_generator import (
> + PerformanceTrafficGenerator,
> + PerformanceTrafficStats,
> +)
>
> from .exception import ConfigurationError, InternalError, TestCaseVerifyError
> from .logger import DTSLogger, get_dts_logger
> @@ -254,11 +258,11 @@ def send_packets_and_capture(
> A list of received packets.
> """
> assert isinstance(
> - self._ctx.func_tg, CapturingTrafficGenerator
> + self._ctx.tg, CapturingTrafficGenerator
This looks like it's fixing an issue I noted earlier in the review,
should be squashed.
> ), "Cannot capture with a non-capturing traffic generator"
> # TODO: implement @requires for types of traffic generator
> packets = self._adjust_addresses(packets)
> - return self._ctx.func_tg.send_packets_and_capture(
> + return self._ctx.tg.send_packets_and_capture(
> packets,
> self._ctx.topology.tg_port_egress,
> self._ctx.topology.tg_port_ingress,
> @@ -266,6 +270,27 @@ def send_packets_and_capture(
> duration,
> )
>
> + def assess_performance_by_packet(
> + self, packet: Packet, send_mpps: int, duration: int = 60
> + ) -> PerformanceTrafficStats:
> + """Send a given packet for a given duration and assess basic performance statistics.
> +
> + Send `packet` and assess NIC performance for a given duration, corresponding to the test
> + suite's given topology.
> +
> + Args:
> + packet: The packet to send.
> + send_mpps: The millions packets per second send rate.
> + duration: Performance test duration (in seconds).
> +
> + Returns:
> + Performance statistics of the generated test.
> + """
> + assert isinstance(
> + self._ctx.tg, PerformanceTrafficGenerator
> + ), "Cannot run performance tests on non-performance traffic generator."
> + return self._ctx.tg.calculate_traffic_and_stats(packet, send_mpps, duration)
> +
> def send_packets(
> self,
> packets: list[Packet],
> @@ -275,8 +300,11 @@ def send_packets(
> Args:
> packets: Packets to send.
> """
> + assert isinstance(
> + self._ctx.tg, CapturingTrafficGenerator
> + ), "Cannot run performance tests on non-capturing traffic generator."
I am still unsure if we are meant to have co-existing traffic
generators. But we should make everything more tolerant, ideally this
should never be reached, and DTS should automatically skip tests
appropriately. The above assertion and message don't really appear
related, so this should also be rectified.
> packets = self._adjust_addresses(packets)
> - self._ctx.func_tg.send_packets(packets, self._ctx.topology.tg_port_egress)
> + self._ctx.tg.send_packets(packets, self._ctx.topology.tg_port_egress)
>
> def get_expected_packets(
> self,
next prev parent reply other threads:[~2025-07-02 16:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 19:40 [RFC Patch v1 0/5] Add TREX Traffic Generator to DTS Framework Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 1/5] dts: rework config module to support perf TGs Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 2/5] dts: rework traffic generator inheritance structure Nicholas Pratte
2025-05-15 19:24 ` Patrick Robb
2025-05-16 19:12 ` Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 3/5] dts: add asychronous support to ssh sessions Nicholas Pratte
2025-05-15 19:24 ` Patrick Robb
2025-04-23 19:40 ` [RFC Patch v1 4/5] dts: add trex traffic generator to dts framework Nicholas Pratte
2025-05-15 19:25 ` Patrick Robb
2025-05-16 19:45 ` Nicholas Pratte
2025-04-23 19:40 ` [RFC Patch v1 5/5] dts: add performance test functions to test suite api Nicholas Pratte
2025-05-15 19:25 ` Patrick Robb
2025-05-16 20:18 ` [RFC v2 0/6] Add TREX Traffic Generator to DTS Framework Nicholas Pratte
2025-05-16 20:18 ` [RFC v2 1/6] dts: rework config module to support perf TGs Nicholas Pratte
2025-05-20 20:33 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 2/6] dts: rework traffic generator inheritance structure Nicholas Pratte
2025-05-21 20:36 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 3/6] dts: add asynchronous support to ssh sessions Nicholas Pratte
2025-05-22 15:04 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 4/6] dts: add extended timeout option to interactive shells Nicholas Pratte
2025-05-22 15:10 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 5/6] dts: add trex traffic generator to dts framework Nicholas Pratte
2025-05-22 16:55 ` Dean Marx
2025-05-16 20:18 ` [RFC v2 6/6] dts: add performance test functions to test suite api Nicholas Pratte
2025-05-22 17:54 ` Dean Marx
2025-07-02 5:21 ` [PATCH v3 1/5] dts: rework config module to support perf TGs Patrick Robb
2025-07-02 5:21 ` [PATCH v3 2/5] dts: rework traffic generator inheritance structure Patrick Robb
2025-07-02 15:31 ` Luca Vizzarro
2025-07-02 5:21 ` [PATCH v3 3/5] dts: add timeout override option to interactive shells Patrick Robb
2025-07-02 15:33 ` Luca Vizzarro
2025-07-02 5:21 ` [PATCH v3 4/5] dts: add trex traffic generator to dts framework Patrick Robb
2025-07-02 16:32 ` Luca Vizzarro
2025-07-02 5:21 ` [PATCH v3 5/5] dts: add performance test functions to test suite API Patrick Robb
2025-07-02 16:37 ` Luca Vizzarro [this message]
2025-07-02 15:09 ` [PATCH v3 1/5] dts: rework config module to support perf TGs 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=6f7c2436-7b2c-4b0b-b1e0-538bce473f31@arm.com \
--to=luca.vizzarro@arm.com \
--cc=Paul.Szczepanek@arm.com \
--cc=abailey@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=dmarx@iol.unh.edu \
--cc=mmahajan@iol.unh.edu \
--cc=npratte@iol.unh.edu \
--cc=nprattedev@gmail.com \
--cc=probb@iol.unh.edu \
--cc=thomas.wilks@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).